We need to cater to references, when traversing the files to extract.
While we're at it, we move the `zval_file` declaration into a narrower
scope.
Closes GH-6959.
* Fix return type of php_user_filter::onCreate()
* Fix return type of mysqli::init()
* Fix return type of UConverter::fromUCallback() and UConverter::toUCallback()
While the typed property ensures that the value is a string,
we should make sure that we handle an unset property gracefully.
Do this by throwing the same error we would normally throw if
you access an uninitializde typed property.
This variable can indeed be uninitialized when passed to convert_cp,
though it will not actually be used if uninitialized. This is
still UB though, so let's fix it.
zend_string_dup() can return the original string if it is interned.
Of course, the string can't be interned here, but GCC doesn't know
that and throws a warning in release builds.
Replace zend_string_dup() (which is a bad API anyway) with a direct
call to zend_string_init(), which makes it more obvious that the
original alloca'd string cannot be reused.
open_mode was initialized to "wb", but the length set only to 1.
The effect of this was that the stream is opened using "wb", but
we only report "w".
Fix the length to report the actually used open_mode.
This is meant to test against certain fixed responses of Firebird
servers. For now we add just a most basic test which verifies a
connection attempt.
Closes GH-6940.
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
Make sure that the previous opline is part of the same block,
otherwise it may be non-dominating.
The test case does not fail on PHP-7.4, but I think the general
problem can appear on 7.4 as well, so I'm applying the patch to
that branch.
The ?array $ctorArgs = null parameter is changed to array $constructorArgs = [], and an additional memory leak revealed by the new test case is fixed.
Closes GH-6937
Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com>
The argument should be an input string and not a filename.
Fix: https://github.com/php/doc-en/pull/559
Suggested-by: George Peter Banyard <girgias@php.net>
Closes GH-6942.