Dmitry Stogov [Mon, 5 Feb 2018 16:40:06 +0000 (19:40 +0300)]
Avoid repeatable ARG_SHOULD_BE_SENT_BY_REF() checks in FETCH_*FUNC_ARG and following SEND_VAR_EX. Perform the check once in a new CHECK_FUNC_ARG opcode and reuse in the following FETCH_*FUNC_ARG and SEND_FUNC_ARG (SEND_VAR_EX replacement).
Gabriel Caruso [Sun, 4 Feb 2018 18:42:36 +0000 (16:42 -0200)]
Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows
"boolean" as an alias. This changes the error messages to match
the actual type name and avoids confusing messages like "must be
of type boolean, boolean given".
Gabriel Caruso [Sun, 4 Feb 2018 13:33:49 +0000 (11:33 -0200)]
Use int instead of integer in type errors
PHP requires integer typehints to be written "int" and does not
allow "integer" as an alias. This changes type error messages to
match the actual type name and avoids confusing messages like
"must be of the type integer, integer given".
Nikita Popov [Sat, 3 Feb 2018 17:17:12 +0000 (18:17 +0100)]
Remove some references to E_STRICT in tests
run-tests.php enforces error_reporting=E_ALL (including E_STRICT),
setting this explicitly in not necessary. Conversely, after the
removal of some E_STRICT errors, explicitly excluding it is no
longer necessary in some places.
Nikita Popov [Sat, 3 Feb 2018 16:40:45 +0000 (17:40 +0100)]
Avoid another unused opline warning
The unconditional opline load here used to be necessary for freeing
the return value in case of exception. However, this is no longer
the case, so using LOAD_OPLINE() should be sufficient now.
Gabriel Caruso [Thu, 25 Jan 2018 04:21:03 +0000 (02:21 -0200)]
Fix DateTime*::__set_state arginfo
This is a minor BC break, because classes inheriting from DateTime and
overriding __set_state() now have to specify the additional parameter
as well. However, adding the additional parameter also continues to
work on previous versions of PHP, so this change is acceptable for
master.
The test requires the session extension, which may not be available, in
which case the test would fail, which is expected anyway, but not for
the expected reasons.
Michael Smith [Mon, 29 Jan 2018 15:50:52 +0000 (09:50 -0600)]
Fix spelling and grammar mistakes in php.ini files
The spelling of input_encoding is incorrect in both the php.ini-production
and php.ini-development, as of March, 2014. This fixes the spelling.
Cleaning up spelling and grammar includes wrapping lines to 80 characters,
adding articles such as 'the', and fixing spellings such as pathes to
paths.
Besides that we still hope to sync the complete bundled libgd sometime,
the upstream implementation of `gdImageCrop()` is much simpler than the
current one, and thus better readable and less error prone.
Anatol Belski [Wed, 31 Jan 2018 19:15:30 +0000 (20:15 +0100)]
Fix race conditions with Apache vhost vs. per dir config
If the same php_value/php_flag is present in httpd.conf and .htaccess,
the key is potentially shared between threads. Unfortunately we can't
intern these keys using the current mechanism, because the MPM is setup
before the SAPI module setup is even started. A more elegant way were
to implement a kind of string pool for the thread safe Apache SAPI
config directives with the mechanism similar to what is done for the
SAPI setup now, but doing a separate management.
Anatol Belski [Wed, 31 Jan 2018 19:15:30 +0000 (20:15 +0100)]
Fix race conditions with Apache vhost vs. per dir config
If the same php_value/php_flag is present in httpd.conf and .htaccess,
the key is potentially shared between threads. Unfortunately we can't
intern these keys using the current mechanism, because the MPM is setup
before the SAPI module setup is even started. A more elegant way were
to implement a kind of string pool for the thread safe Apache SAPI
config directives with the mechanism similar to what is done for the
SAPI setup now, but doing a separate management.
Dmitry Stogov [Tue, 30 Jan 2018 19:06:05 +0000 (22:06 +0300)]
Change FETCH/ISSET instruction modifiers:
- Get rid of ZEND_ISEMPTY and ZEND_ISSET_ISEMPTY_MASK. Use just single ZEND_ISSET bit to make distinct between isset() and empty()
- Use ZEND_FETCH_GLOBAL, ZEND_FETCH_LOCAL and ZEND_FETCH_GLOBAL_LOCK as bitmask
- Removed unused ZEND_FETCH_STANDARD
- Extended ZEND_FETCH_ARG_MASK
Nikita Popov [Sun, 28 Jan 2018 21:04:24 +0000 (22:04 +0100)]
Don't loop over indexes in Phar::extractTo()
Instead use a more idiomatic foreach loop. The behavior is not
strictly the same, but I see no reason why this specific case
should enforce continuously indexed integer keys.