Compare commits

...
Author SHA1 Message Date
Remi Collet 316802d8f2 Update versions for PHP 7.2.0beta3 2017-08-15 08:39:24 +00:00
Remi Collet 6c1c49d1b5 Update NEWS for PHP 7.2.0beta3 2017-08-15 08:39:24 +00:00
Anatol Belski 6e3356837d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  move dev to 7.0.24
2017-08-15 09:36:41 +02:00
Anatol Belski 49501f8f41 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  move dev to 7.0.24
2017-08-15 09:36:14 +02:00
Anatol Belski 3af6201224 move dev to 7.0.24 2017-08-15 09:33:30 +02:00
Xinchen Hui 6b77792dc2 Update NEWS 2017-08-15 12:35:17 +08:00
Xinchen Hui 05de40a651 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75075 (unpack with X* causes infinity loop)
2017-08-15 12:35:10 +08:00
Xinchen Hui 6275825c68 Update NEWS 2017-08-15 12:34:58 +08:00
Xinchen Hui 4f8e703854 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75075 (unpack with X* causes infinity loop)
2017-08-15 12:34:37 +08:00
Xinchen Hui d8c80af71e Fixed bug #75075 (unpack with X* causes infinity loop) 2017-08-15 12:34:13 +08:00
Tianfang Yang 9ec0a2071c Merge branch 'PHP-7.1' into PHP-7.2 2017-08-14 21:22:17 -04:00
Tianfang Yang e112d71435 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-14 21:21:11 -04:00
Tianfang Yang 2def85688d Merge branch 'syncoci8' into PHP-7.0 2017-08-14 21:16:34 -04:00
Tianfang Yang 259477826c Prepare for PECL release 2017-08-14 21:14:14 -04:00
Anatol Belski 5dc847c53d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Test cleanup improvements, files might be locked in the test process
2017-08-14 14:40:26 +02:00
Anatol Belski 1f3b87dc11 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Test cleanup improvements, files might be locked in the test process
2017-08-14 14:39:58 +02:00
Anatol Belski ab07265573 Test cleanup improvements, files might be locked in the test process 2017-08-14 13:08:04 +02:00
Anatol Belski 707b2a529e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix test cleanup
2017-08-14 12:56:49 +02:00
Anatol Belski bd0b0cc8c9 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test cleanup
2017-08-14 12:55:58 +02:00
Anatol Belski 71fd58652f fix test cleanup 2017-08-14 12:55:14 +02:00
Dmitry Stogov df5104bfc9 Fixed removing dead live ranges 2017-08-14 13:54:52 +03:00
Anatol Belski 112afb9250 [ci skip] update NEWS 2017-08-14 12:24:51 +02:00
Anatol Belski 2492add033 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
2017-08-14 12:24:20 +02:00
Anatol Belski 73d84d4bbd [ci skip] update NEWS 2017-08-14 12:23:51 +02:00
Dmitry Stogov 18f567a3b4 Fixed test 2017-08-14 12:37:37 +03:00
Dmitry Stogov a80e462fbd Order live ranges according to "start" position 2017-08-14 12:21:07 +03:00
Dmitry Stogov cd6893aed1 Fixed attempt to free invalid structure (result of ROPE_INIT is not a zval) 2017-08-14 12:11:25 +03:00
Dmitry Stogov d6406bbf5f Merge branch 'PHP-7.2' of git.php.net:php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:php-src:
  Revert "Fixed live_range removing (bug can be triggred by JIT)"
2017-08-14 12:00:30 +03:00
Dmitry Stogov 2fab62271a Revert "Fixed live_range removing (bug can be triggred by JIT)"
This reverts commit aecf996510.
2017-08-14 12:00:02 +03:00
Xinchen Hui 6445b3a68f Revert "Fixed live_range removing (bug can be triggred by JIT)"
This reverts commit aecf996510.
2017-08-14 16:59:01 +08:00
Tianfang Yang 1135161b4f Merge branch 'PHP-7.1' into PHP-7.2 2017-08-14 00:36:33 -04:00
Tianfang Yang 4d936c1254 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-14 00:23:41 -04:00
Tianfang Yang f555224743 Sync OCI8 on PHP 7.x branches 2017-08-13 23:44:24 -04:00
Anatol Belski 0a2a136111 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75063
2017-08-14 00:51:47 +02:00
Anatol Belski 3069ad8dd1 Fixed bug #75063 2017-08-14 00:44:19 +02:00
Christoph M. Becker 36eddfc785 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #73793 (WDDX uses wrong decimal seperator)
2017-08-13 21:05:57 +02:00
Christoph M. Becker 207105b1a3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73793 (WDDX uses wrong decimal seperator)
2017-08-13 21:03:45 +02:00
Christoph M. Becker f64be0b013 Fixed bug #73793 (WDDX uses wrong decimal seperator)
The WDDX specification[1] requires to serialize floats with a decimal
point, but `snprintf()` is locale-dependent and may use a decimal
comma. We fix that afterwards by replacing an eventual comma with a
point.

[1] <http://xml.coverpages.org/wddx0090-dtd-19980928.txt>
2017-08-13 20:51:53 +02:00
Christoph M. Becker bbf39c550f Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Skip this test if ext/session is not available
2017-08-13 18:10:37 +02:00
Christoph M. Becker de5a5f6fdc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Skip this test if ext/session is not available
2017-08-13 18:07:42 +02:00
Christoph M. Becker 472b25921e Skip this test if ext/session is not available 2017-08-13 18:05:45 +02:00
Nikita Popov b202587e09 Note deprecation of $errcontext 2017-08-12 20:34:44 +02:00
Nikita Popov a871badf2a Merge branch 'PHP-7.1' into PHP-7.2 2017-08-12 13:17:24 +02:00
Nikita Popov 4fb7665c09 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-12 13:15:48 +02:00
Nikita Popov 1a23ebc1ff Fixed bug #74103 and bug #75054
Directly fail unserialization when trying to acquire an r/R
reference to an UNDEF HT slot. Previously this left an UNDEF and
later deleted the index/key from the HT.

What actually caused the issue here is a combination of two
factors: First, the key deletion was performed using the hash API,
rather than the symtable API, such that the element was not actually
removed if it used an integral string key. Second, a subsequent
deletion operation, while collecting trailing UNDEF ranges, would
mark the element as available for reuse (leaving a corrupted HT
state with nNumOfElemnts > nNumUsed).

Fix this by failing early and dropping the deletion code.
2017-08-12 13:11:35 +02:00
Andrea Faulds f877b86604 Merge branch 'PHP-7.1' into PHP-7.2 2017-08-12 01:38:46 +01:00
Andrea Faulds e88ab74886 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-12 01:37:47 +01:00
Andrea Faulds b59718bdc4 Fix bug #74725 (html_errors=1 breaks unhandled exceptions) 2017-08-12 01:37:20 +01:00
Xinchen Hui aecf996510 Fixed live_range removing (bug can be triggred by JIT) 2017-08-11 21:56:30 +08:00
Jakub Zelenka e53dd027c5 Reset utf8_invalid in json scanner 2017-08-10 19:47:58 +01:00
Jakub Zelenka f5b4cb7130 Fix possible overflow in json scanner utf8_invalid_count 2017-08-10 19:40:02 +01:00
Xinchen Hui 4375a6c5cd Fixed type infer for FUNC_GET_ARGS 2017-08-11 00:33:55 +08:00
Xinchen Hui f7cf839213 Update NEWs 2017-08-09 11:29:54 +08:00
Xinchen Hui e7dd9c781b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:29:46 +08:00
Xinchen Hui 46ecda76ba Update NEWS 2017-08-09 11:29:32 +08:00
Xinchen Hui 307acb6618 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results)
2017-08-09 11:29:13 +08:00
Xinchen Hui b06f8cb58b Fixed bug #75049 (spl_autoload_unregister can't handle spl_autoload_functions results) 2017-08-09 11:28:53 +08:00
Anatol Belski 823ca5c697 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Remove mistakingly added line
2017-08-08 19:40:42 +02:00
Anatol Belski 42608a3401 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Remove mistakingly added line
2017-08-08 19:40:28 +02:00
Anatol Belski afb20f4895 Remove mistakingly added line 2017-08-08 19:37:55 +02:00
Anatol Belski e62db6309c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Sync makefile options for phpize
2017-08-08 17:59:44 +02:00
Anatol Belski 315d3910fa Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Sync makefile options for phpize
2017-08-08 17:59:15 +02:00
Anatol Belski 075986f214 Sync makefile options for phpize
- run target
- debugger mode
2017-08-08 17:58:10 +02:00
Frank Denis ef0bd7b215 sodium ext: Use _ietf_ vs _IETF_ consistently 2017-08-08 17:50:17 +02:00
Frank Denis 03314e3f69 sodium ext: No need for #ifdef crypto_aead_chacha20poly1305_IETF_
chacha20poly1305_ietf was implemented in libsodium 1.0.4 which is way earlier
than the minimum version we support.
2017-08-08 17:42:38 +02:00
Frank Denis 596a892c5e Sodium ext: Isolate a return statement for consistency 2017-08-08 17:38:13 +02:00
Frank Denis a0d1e0915c sodium ext: The default password hashing function is not supposed to be Argon2i 2017-08-08 17:37:06 +02:00
Frank Denis 631fc3c9c1 sodium ext: long -> zend_long 2017-08-08 17:36:06 +02:00
Frank Denis 3140d40421 sodium ext: Add missing "return" statements after zend_throw_exception() 2017-08-08 17:34:20 +02:00
Darek Slusarczyk abd97b8bcb Merge branch 'PHP-7.1' into PHP-7.2
# Conflicts:
#	ext/json/config.w32
2017-08-08 16:08:19 +02:00
Darek Slusarczyk 86aa1ca990 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-08 16:05:13 +02:00
Darek Slusarczyk 618dcd6520 JSON: fix config.w32 / Install headers on windows 2017-08-08 15:52:53 +02:00
Andrey Hristov f589e5c791 Add new enum options defined in MySQL 5.7 2017-08-08 14:57:01 +03:00
Anatol Belski dcd669b4d9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Unify EOL
2017-08-07 17:04:15 +02:00
Anatol Belski 9ebf813ea4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Unify EOL
2017-08-07 17:03:54 +02:00
Anatol Belski 4c9fe5a490 Unify EOL 2017-08-07 17:03:17 +02:00
Anatol Belski d36344e888 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix test target for phpize
2017-08-07 16:45:57 +02:00
Anatol Belski da966a93ac Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix test target for phpize
2017-08-07 16:45:41 +02:00
Anatol Belski d058e30917 fix test target for phpize 2017-08-07 16:45:02 +02:00
Jakub Zelenka 41d7621f48 Fix segfault in json ignoring of invalid UTF8 2017-08-06 17:20:31 +01:00
Nikita Popov 6b73b2d6eb Check for empty string in mb_ord() 2017-08-04 22:20:05 +02:00
Côme Chilliet aa0e402acf Added controls parameters to ldap_exop so that control support can be added later 2017-08-04 18:10:49 +02:00
Remi Collet 17bb8d575a win32 for pdo_sqlite 2017-08-04 13:28:48 +02:00
Remi Collet bf1c242cf4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  use AC_DEFINE + win32
2017-08-04 13:21:54 +02:00
Remi Collet aee20e637a Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  use AC_DEFINE + win32
2017-08-04 13:21:41 +02:00
Remi Collet 159e5c1048 use AC_DEFINE + win32 2017-08-04 13:21:28 +02:00
Nikita Popov 353f7bf461 Also check for invalid codepoints in mb_ord()
And return false in that case, instead of returning 0x3f...
2017-08-04 13:01:03 +02:00
Nikita Popov e53162a32b Return false on invalid codepoint in mb_chr()
Instead of returning the encoding of the current substitution
character. This allows a robust check for the failure case. The
substitution character (especially the default of "?") is also
a valid output of mb_chr() for a valid input (for "?" that would be
0x3f), so it's a bad choice for an error value.
2017-08-03 22:36:42 +02:00
Nikita Popov 41e9ba6333 Always use Unicode codepoints in mb_ord() and mb_chr()
Previously mb_chr() had two different encoding-dependent behaviors:
 * For "Unicode-encodings" it took a Unicode codepoint and returned
   its encoded representation.
 * Otherwise it returned a big-endian binary encoding of the passed
   integer.

Now the input is always interpreted as a Unicode codepoint. If
a big-endian binary encoding is what you want, you don't need
mbstring to implement that.
2017-08-03 22:14:00 +02:00
Nikita Popov fb9bf5b64b Revert/fix substitution character fallback
The introduced checks were not correct in two respects:
 * It was checked whether the source encoding of the string matches
   the internal encoding, while the actually relevant encoding is
   the *target* encoding.
 * Even if the correct encoding is used, the checks are still too
   conservative. Just because something is not a "Unicode-encoding"
   does not mean that it does not map any non-ASCII characters.

I've reverted the added checks and instead adjusted mbfl_convert
to first try to use the provided substitution character and if
that fails, perform the fallback to '?' at that point. This means
that any codepoint mapped in the target encoding should now be
correctly supported and anything else should fall back to '?'.
2017-08-03 21:53:59 +02:00
Nikita Popov a8a9e93e9a Revert/fix mb_substitute_character() codepoint checks
The introduced checks did not treat "non-Unicode" encodings correctly,
because they treated the passed integer as encoded in the internal
encoding in that case, while in actuality the substitute character
is always a Unicode codepoint.

Additionally checking the codepoint against the internal encoding
is not correct in any case, because the substitution character must
be mapped in the *target* encoding of the conversion, which does
not necessarily coincide with the internal encoding (the internal
encoding is the default *source* encoding, not *target* encoding).

This reverts the checks back to simple range checks, but in a way
that still resolves #69079: Characters outside the Basic
Multilingual Plane are now accepted and Surrogate Codepoints are
rejected. A distinction between UTF-8 and non-UTF-8 encodings is
not made for surrogate checks (as in the original patch), as
surrogates are always illegal on their own. Specifying a surrogate
as substitution character would only make sense if you could
specify a substitution string with more than one character --
however we do not support that.
2017-08-03 21:12:41 +02:00
Anatol Belski 355743600d Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Increase expected timing on Travis
2017-08-03 15:08:05 +02:00
Anatol Belski 21c6ba3412 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Increase expected timing on Travis
2017-08-03 15:07:47 +02:00
Anatol Belski 9689796c10 Increase expected timing on Travis
If 5ms to read/write 8 bytes still has issue, probably next this test
should skip on Travis to avoid false positive fails.
2017-08-03 15:05:22 +02:00
Anatol Belski 93c2c56a1b Rework automatic interactive cli activation
There are still systems delivering buggy console info. If a file was
passed, obviously no interaction is meant.
2017-08-03 11:23:50 +02:00
Anatol Belski 39f0e810c9 [ci skip] update NEWS 2017-08-02 21:51:35 +02:00
Anatol Belski fbc8596b68 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  update NEWS
2017-08-02 21:51:01 +02:00
Anatol Belski 54e2224df7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  update NEWS
2017-08-02 21:50:26 +02:00
Anatol Belski 3e5b8c1e89 [ci skip] update NEWS 2017-08-02 21:49:56 +02:00
Anatol Belski 9ba2cfd33e update NEWS 2017-08-02 21:49:21 +02:00
Andreas Treichel 29e4d4eee6 Add ftp_append to create a new file or append data to an existing file (RFC959) 2017-08-02 20:52:28 +02:00
Nikita Popov aa925cb0ad Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:50:18 +02:00
Nikita Popov 4988e83fe9 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:50:04 +02:00
Andreas Treichel c2b8066efb Bug #74975: Different serialization for classes 2017-08-02 18:49:26 +02:00
Nikita Popov 042ff13ca9 Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:18:23 +02:00
Nikita Popov 9871555090 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:16:56 +02:00
Nikita Popov 9ca1b2a775 Merge remote-tracking branch 'php-src/PHP-7.0' into PHP-7.0 2017-08-02 18:16:18 +02:00
Nikita Popov 91240073ea Merge branch 'PHP-7.1' into PHP-7.2 2017-08-02 18:11:12 +02:00
Nikita Popov 63607375f5 Merge branch 'PHP-7.0' into PHP-7.1 2017-08-02 18:09:09 +02:00
Fabien Villepinte 2cc1cbf2f4 Fix Bug #75001: Wrong reflection on mb_eregi_replace 2017-08-02 18:08:42 +02:00
Fabien Villepinte 15abb2b56e Fix test transliterator_create_inverse_basic.phpt 2017-08-02 18:04:43 +02:00
George Wang e78712791d take care of compile warnings. 2017-08-02 11:59:41 -04:00
Tyson Andre 5097e2ee13 Implement spl_object_id(object $x) : int
spl_object_id is a new function returning the object handle,
as a signed integer.

Discussion for this new function is ongoing on php-internals, see
https://marc.info/?t=143835274500003&r=1&w=2

The object id is unique for the lifetime of the object.
When the object is garbage collected,
different objects may & will have the same object id.

- This is also the case for the string generated by spl_object_hash

It is always possible to cast the object handle to a **signed** zend_long
in php 7.2. _zend_object->handle is always of the type `uint32_t`.
(zend_long is 32 bits on 32 bit builds, 64 bits on 64 bit builds)

As of php 7.0, the object id uniquely identifies the object,
there can't be two objects with the same id but different handlers
(See the implementation of spl_object_hash)

Skip the pointless XORing, as discussed in internals.

- It was intended to avoid exposing in-memory addresses.
- The object handle is not a memory address.
- The output of var_dump() includes the object handle(id)
2017-08-02 17:54:07 +02:00
Anatol Belski b4bce59fe9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75002 Null Pointer Dereference in timelib_time_clone
2017-08-02 16:42:20 +02:00
Anatol Belski 1fdc518971 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #75002 Null Pointer Dereference in timelib_time_clone
2017-08-02 16:41:48 +02:00
Derick Rethans b112d09013 Fixed bug #75002 Null Pointer Dereference in timelib_time_clone 2017-08-02 16:40:48 +02:00
Remi Collet afdf7519d1 fix build with old system libsqlite (sqlite3_close_v2 may be missing) 2017-08-02 16:09:36 +02:00
Remi Collet 5e5895a464 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix build with old system libsqlite (sqlite3_errstr may be missing)
2017-08-02 14:03:23 +02:00
Remi Collet 5f030924c1 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix build with old system libsqlite (sqlite3_errstr may be missing)
2017-08-02 14:03:02 +02:00
Remi Collet 666cb6c802 fix build with old system libsqlite (sqlite3_errstr may be missing) 2017-08-02 14:01:56 +02:00
Joe Watkins 6202c821a9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fixed #endif comments
2017-08-02 08:35:51 +01:00
Joe Watkins 9c6262f39b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fixed #endif comments
2017-08-02 08:35:38 +01:00
clwu b2934d2612 fixed #endif comments 2017-08-02 08:35:27 +01:00
Christoph M. Becker 43e7656241 Update NEWS 2017-08-02 00:11:11 +02:00
Sara Golemon 6278f6140f Update NEWS for 7.2.0beta3 2017-08-01 12:50:56 -04:00
Sara Golemon 1b05a2373b Update NEWS for PHP 7.2.0beta2 2017-08-01 12:50:55 -04:00
Christoph M. Becker fe107cce45 Update to SQLite 3.20.0 2017-08-01 18:26:14 +02:00
Nikita Popov 6c2c7a023d Optimize array_unique()
In SORT_STRING mode, instead of sorting the array, build a hash of
seen elements.
2017-08-01 18:08:38 +02:00
Julien Pauli 5069d52189 Updated NEWS 2017-08-01 16:03:00 +02:00
Julien Pauli 4f06b62781 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Updated NEWS
  Updated NEWS
  Fix #75015. Crash in SPL destructors
2017-08-01 16:02:36 +02:00
Julien Pauli f0d40286e7 Updated NEWS 2017-08-01 16:02:26 +02:00
Julien Pauli cd06b5af09 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Updated NEWS
  Fix #75015. Crash in SPL destructors
2017-08-01 16:02:00 +02:00
Julien Pauli 0c0cbb43da Updated NEWS 2017-08-01 16:01:43 +02:00
Julien Pauli 64e6ddc7f7 Fix #75015. Crash in SPL destructors 2017-08-01 15:59:54 +02:00
Julien Pauli ad5222c3a6 Fix use of uninitialised value in uniqid() where more_entropy=0 2017-08-01 14:58:00 +02:00
Anatol Belski b8da481a2a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Test to cover the change in ce1a0d97
2017-08-01 12:51:20 +02:00
Anatol Belski d9d152b895 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Test to cover the change in ce1a0d97
2017-08-01 12:50:52 +02:00
Anatol Belski a8e25fdbf8 Test to cover the change in ce1a0d97 2017-08-01 12:49:45 +02:00
Anatol Belski 2164e3a0b8 fix test 2017-08-01 11:56:23 +02:00
Anatol Belski ce1a0d971b fix NULL deref 2017-08-01 11:55:32 +02:00
Xinchen Hui 5856becc2b Update NEWS 2017-07-31 11:52:23 +08:00
Xinchen Hui 9b87b73fec Req #74963 (Improved error message on fetching property of non-object) 2017-07-31 11:51:23 +08:00
Kalle Sommer Nielsen c62e5eb0a9 Reduce EXIF test image sizes, there is still one large image left that I will look into reducing if possible (bug50845.jpg)
The changes in phpts are due to exiftool, I verified that all the images still remain relevant for testing
2017-07-30 21:59:55 +02:00
Kalle Sommer Nielsen 97ff7bbb36 Lowercase the file extension 2017-07-30 21:59:10 +02:00
Anatol Belski 03383119d2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  remove dup of the binary file, rely on a test runtime copy instead
2017-07-30 17:52:36 +02:00
Anatol Belski eab66f9068 remove dup of the binary file, rely on a test runtime copy instead 2017-07-30 17:51:27 +02:00
Christoph M. Becker 4db1e1adf2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Shrink another large image
2017-07-30 16:35:07 +02:00
Christoph M. Becker 2d6d1ec55b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Shrink another large image
2017-07-30 16:27:38 +02:00
Christoph M. Becker 2d96fdd54f Shrink another large image
This image is only used for testing `BITMAPV5HEADER` support in
`getimagesize()` (see bf9ad4e). Therefore it is not necessary to have
a big image; a single pixel is sufficient.
2017-07-30 16:26:06 +02:00
Frank Denis 0c21187363 Merge branch 'PHP-7.2' of git.php.net:php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:php-src:
  Shrink test image
2017-07-30 15:42:24 +02:00
Frank Denis 34df3cdafa sodium ext: skip scrypt if it is not available
scrypt was removed from minimal libsodium builds in version 1.0.13
2017-07-30 15:41:34 +02:00
Frank Denis 650f68c36e sodium ext: fix tests/pwhash_argon2i description 2017-07-30 15:05:21 +02:00
Christoph M. Becker d53b78c6ed Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Shrink test image
2017-07-30 15:01:59 +02:00
Frank Denis 74d7f1d04e sodium ext: check hash length for scrypt 2017-07-30 15:00:03 +02:00
Frank Denis 3f45262aa9 Merge branch 'PHP-7.2' of git.php.net:php-src into PHP-7.2
* 'PHP-7.2' of git.php.net:php-src:
  It's `--SKIPIF--`, not `--SKIP--`
2017-07-30 14:48:44 +02:00
Frank Denis 85895b2e5b sodium ext: no need for #ifdef crypto_aead_chacha20poly1305_IETF_NPUBBYTES
chacha20poly1305_ietf was implemented in libsodium 1.0.4 which is way earlier
than the minimum version we support.
2017-07-30 14:47:49 +02:00
Frank Denis 1d7e1f845f sodium ext: check that message sizes are safe, to avoid hitting abort() in libsodium 2017-07-30 14:45:06 +02:00
Christoph M. Becker 82e4ad3983 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Shrink test image
2017-07-30 14:44:52 +02:00
Christoph M. Becker 74a696d53b Shrink test image
The last (`IDAT`) chunk in this file starting at `0x5e265` reports to
have a length of `0x2000` bytes, but there are only `0x1D9B` bytes
left. Simply cutting the first `IDAT` chunk which starts at `0x31` and
also reports a length of `0x2000` at the same offset should produce the
same test results (while reducing the file size to 7.628 bytes).
2017-07-30 14:43:37 +02:00
Frank Denis ae99959986 sodium ext: use unexpand -t 4 --first-only to convert from spaces to tabs
No actual code changes.

Fun fact: macOS' unexpand(1) tool doesn't work as documented, and always
converts everything to tabs, regardless of the -a switch.
2017-07-30 14:34:55 +02:00
Christoph M. Becker 782f45c8e6 It's --SKIPIF--, not --SKIP-- 2017-07-30 14:01:51 +02:00
Christoph M. Becker 71e47c5c13 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Skip this test if ext/gd is not available
2017-07-30 13:37:36 +02:00
Christoph M. Becker f213ee5952 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Skip this test if ext/gd is not available
2017-07-30 13:30:18 +02:00
Christoph M. Becker 4d6f808c16 Skip this test if ext/gd is not available 2017-07-30 13:24:10 +02:00
Frank Denis 613c8dd7b0 sodium ext: let crypto_pwhash() accept an optional algorithm identifier 2017-07-29 13:04:54 +02:00
Nikita Popov 5d777e56e2 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-28 13:03:26 +02:00
Nikita Popov c48c638aeb Merge branch 'PHP-7.0' into PHP-7.1 2017-07-28 13:03:02 +02:00
Nikita Popov e3d25e78eb Fixed bug #62934 2017-07-28 13:02:25 +02:00
Anatol Belski 80d839d25a add missing makefile fragment for .w32
ensure correct dir
2017-07-28 07:26:11 +02:00
Anatol Belski 2ae0dd7f61 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  relax test on travis
2017-07-28 00:28:12 +02:00
Anatol Belski 55e7459cea Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  relax test on travis
2017-07-28 00:27:52 +02:00
Anatol Belski b01336814d relax test on travis 2017-07-28 00:27:11 +02:00
Sara Golemon 4a6ef8327a Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Simpler fix for #74974
2017-07-27 10:04:59 -04:00
Sara Golemon b62fb3aa0c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Simpler fix for #74974
2017-07-27 10:04:14 -04:00
Pedro Magalhães 34e5d3a87d Simpler fix for #74974 2017-07-27 09:25:38 -04:00
Xinchen Hui 262aeb8ae1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed test
2017-07-27 12:50:41 +08:00
Xinchen Hui 0ddda0dcb7 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed test
2017-07-27 12:50:28 +08:00
Xinchen Hui 9fcfe52d03 Fixed test 2017-07-27 12:50:17 +08:00
Xinchen Hui afc2be8fc8 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #74949 (null pointer dereference in _function_string)
2017-07-27 11:24:53 +08:00
Xinchen Hui f894bb750c Update NEWS 2017-07-27 11:24:26 +08:00
Xinchen Hui efb1be547c Update NEWS 2017-07-27 11:23:52 +08:00
Xinchen Hui 84a18c4782 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74949 (null pointer dereference in _function_string)
2017-07-27 11:23:27 +08:00
Xinchen Hui e36c04ef48 Fixed bug #74949 (null pointer dereference in _function_string) 2017-07-27 11:23:06 +08:00
Sara Golemon 08fef4cc23 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Bugfix #74993 Wrong reflection param into for some intl: lookup_*() methods
2017-07-26 18:56:06 -04:00
Sara Golemon 80f4297c25 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Bugfix #74993 Wrong reflection param into for some intl: lookup_*() methods
2017-07-26 18:55:46 -04:00
Sara Golemon c7aa8ba0ee Bugfix #74993 Wrong reflection param into for some intl: lookup_*() methods 2017-07-26 18:55:23 -04:00
Anatol Belski 57c435e5ac [ci skip] update NEWS 2017-07-26 17:31:57 +02:00
Anatol Belski 2d8fe973b1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-07-26 17:31:10 +02:00
Anatol Belski 4cde48bb73 [ci skip] update NEWS 2017-07-26 17:30:40 +02:00
Anatol Belski 3f9e8e6686 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] update NEWS
2017-07-26 17:30:02 +02:00
Anatol Belski 3306b3aa60 [ci skip] update NEWS 2017-07-26 17:29:37 +02:00
Anatol Belski 9ff4801159 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #74833, SID constant created with wrong module number
2017-07-26 13:21:20 +02:00
Anatol Belski eaf5c7cdd4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74833, SID constant created with wrong module number
2017-07-26 13:20:48 +02:00
Anatol Belski bd00fe81cc Fixed bug #74833, SID constant created with wrong module number 2017-07-26 13:19:41 +02:00
Joe Watkins d3060a00d1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases
2017-07-26 10:47:49 +01:00
Joe Watkins bb9ea4e88b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases
2017-07-26 10:47:22 +01:00
Benjamin W. Broersma 6b1fbafdf0 Fix bug #74991 - include_path has a 4096 char (minus "__DIR__:") limit, in some PHAR cases 2017-07-26 10:46:50 +01:00
Christopher Jones 787ea0dda5 Update NEWS 2017-07-26 15:25:01 +10:00
Christopher Jones 664eca5967 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-26 15:24:26 +10:00
Christopher Jones 747f5b23ae Update NEWS 2017-07-26 15:23:58 +10:00
Christopher Jones 46a6ae0d45 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-26 15:23:17 +10:00
Christopher Jones de65a2243f Expose oci_unregister_taf_callback() 2017-07-26 15:22:44 +10:00
Xinchen Hui 53e59e4b34 Update NEWS 2017-07-26 12:07:20 +08:00
Xinchen Hui 0e61cddeb1 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #74980 (Narrowing occurred during type inference)
2017-07-26 12:06:55 +08:00
Xinchen Hui 3df47c12f7 Fixed bug #74980 (Narrowing occurred during type inference) 2017-07-26 12:06:33 +08:00
Aleš Rebec f469edcf59 Remove obsolete function names from CODING_STANDARDS file
Deprecated and removed function names used as examples in coding standards file.

- Mcrypt is deprecated and will be removed in 7.2
- Mysql functions are deprecated in 5.4 and removed in 7.0.

According to those changes, CODING_STANDARDS file should be updated.
2017-07-25 07:04:23 +01:00
Joe Watkins 4ddb0630c2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed finding CURL on systems with multiarch support
2017-07-25 06:59:03 +01:00
Joe Watkins 238f837cbc Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed finding CURL on systems with multiarch support
2017-07-25 06:58:37 +01:00
Carsten Brandt 3fd7d819b8 Fixed finding CURL on systems with multiarch support
fixes https://bugs.php.net/bug.php?id=74125

This commit makes the cURL config script aware of debian/ubuntu
[multiarch support][1] which installs architecture specific
headers in a different location.

It checks whether the `dpkg-architecture` script exists and is
executeable, if that is the case, the multiarch architecture is
detected by calling `dpkg-architecture -qDEB_HOST_MULTIARCH` as
documented in [debian multiarch implementation docs][2]:

> `/usr/include/<triplet>`: used for arch-varying headers

[1]: https://wiki.debian.org/Multiarch
[2]: https://wiki.debian.org/Multiarch/Implementation
2017-07-25 06:58:11 +01:00
Joe Watkins 8d5a5fbf6b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  minor loop optimizations, closes #2633
2017-07-25 06:54:20 +01:00
Joe Watkins 78ad5e8864 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  minor loop optimizations, closes #2633
2017-07-25 06:51:44 +01:00
Joe Watkins 69b48f83df minor loop optimizations, closes #2633 2017-07-25 06:47:58 +01:00
Joe Watkins 2e8759428b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed #74977 - Appending AppendIterator leads to segfault
2017-07-25 06:40:25 +01:00
andrewnester dbc2ffba82 Fixed #74977 - Appending AppendIterator leads to segfault 2017-07-25 06:39:50 +01:00
Sammy Kaye Powers 66729aeeeb Fix ext/sodium display in phpinfo() 2017-07-25 06:35:40 +01:00
Anatol Belski 7453d2303b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  switch to binary sdk 2.0.9 for appveyor
2017-07-24 23:09:20 +02:00
Anatol Belski bedd881da6 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  switch to binary sdk 2.0.9 for appveyor
2017-07-24 23:08:07 +02:00
Anatol Belski cdf9178c43 switch to binary sdk 2.0.9 for appveyor 2017-07-24 23:07:15 +02:00
jrfnl f901e7e3c5 Fix typo in PHP 7.2 changelog 2017-07-24 16:57:07 -04:00
Joe Watkins 515b396889 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update copyright year to 2017
2017-07-24 17:24:22 +01:00
Joe Watkins b44484b912 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update copyright year to 2017
2017-07-24 17:24:10 +01:00
Peter Kokot 924ff6164e Update copyright year to 2017 2017-07-24 17:23:57 +01:00
Anatol Belski 0489e85c18 [ci skip] update NEWS 2017-07-24 17:46:31 +02:00
Anatol Belski cb7e42da25 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Add test for bug #74903
2017-07-24 17:03:24 +02:00
Anatol Belski 2dc81d4a09 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add test for bug #74903
2017-07-24 17:02:55 +02:00
Anatol Belski a769d873f8 Add test for bug #74903 2017-07-24 17:02:10 +02:00
Anatol Belski 660b829ccc Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Followup on 0ec147d3 for another place
  Ensure binary mode for OpenSSL I/O
2017-07-24 16:38:05 +02:00
Anatol Belski e2b61eccb9 Followup on 0ec147d3 for another place
which requires also to move the macros into the header

(cherry picked from commit b7eb2c0604)
2017-07-24 16:33:12 +02:00
Anatol Belski 6918a68d9d Ensure binary mode for OpenSSL I/O
Essential for OpenSSL 1.1.0 on Windows, some issues was revealed earlier
and now by openssl_pkcs12_export_to_file_basic.phpt.

(cherry picked from commit 0ec147d301)
2017-07-24 16:31:09 +02:00
Anatol Belski b7eb2c0604 Followup on 0ec147d3 for another place
which requires also to move the macros into the header
2017-07-24 16:24:04 +02:00
Anatol Belski 0ec147d301 Ensure binary mode for OpenSSL I/O
Essential for OpenSSL 1.1.0 on Windows, some issues was revealed earlier
and now by openssl_pkcs12_export_to_file_basic.phpt.
2017-07-24 15:43:48 +02:00
Anatol Belski 8a6afbef3f Combine conditions for the automatic interactive console activation
as with bug #74979 it seems to have regressions which were not
present before.
2017-07-24 14:47:32 +02:00
Frank Denis 742895f60c sodium ext: don't reinvent sodium_increment() and sodium_add() 2017-07-24 14:26:05 +02:00
Joe Watkins 52964bbfb2 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  openssl: Add openssl_pkcs12_export_to_file tests
2017-07-24 10:47:02 +01:00
Joe Watkins 5816ce330c Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  openssl: Add openssl_pkcs12_export_to_file tests
2017-07-24 10:46:52 +01:00
Jelle van der Waa 23c124ec75 openssl: Add openssl_pkcs12_export_to_file tests
Add basic tests for openssl_pkcs12_export_to_file.
2017-07-24 10:46:42 +01:00
Issei.M f1d7857969 Fix typo in UPGRADING for 7.2 2017-07-24 10:44:19 +01:00
Joe Watkins 94e6c72e26 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update PHP 5 version to 7 in header comments
2017-07-24 10:42:48 +01:00
Joe Watkins 642fb44d69 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Update PHP 5 version to 7 in header comments
2017-07-24 10:42:35 +01:00
Peter Kokot c4e11c8ef3 Update PHP 5 version to 7 in header comments 2017-07-24 10:42:15 +01:00
Sara Golemon a6e4a713ea Add hash_hmac_algos() for filtered is_crypto methods 2017-07-23 15:17:09 -04:00
Nikita Popov 706f0cf8a0 Update Unicode data for Unicode 10 2017-07-23 16:05:39 +02:00
Nikita Popov 24cfbfd56f Update ucgendat for more bidi properties
Handle them the same way as others -- by classifying as Other
Neutral.
2017-07-23 16:03:11 +02:00
Nikita Popov 077e61fad3 Fixed bug #69267 completely
ucgendat.c was assuming that a title-case character is a character
that has both lower and upper-case variants. However, there are
title-case characters that only have a lower-case variant. Use the
Lt general character proprety to determine where in the case map
the character should be placed instead.
2017-07-23 15:30:17 +02:00
Nikita Popov c0bcd301d3 Another fix for bug #69267
mb_strtoupper() was converting lowercase characters into
titlecase characters, instead of uppercase characters. Luckily
there are only very few characters with a distinct titlecase
representation, so this mostly worked out okay...
2017-07-23 15:07:02 +02:00
Nikita Popov 0e4af9192f Partial fix for bug #69267
This pulls in 60a25c72ba389f53b0621ca250bc99f3b295d43f from the
OpenLDAP project.
2017-07-23 14:47:21 +02:00
Nikita Popov 88f752a947 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-23 12:21:51 +02:00
Nikita Popov f116a88592 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-23 12:21:16 +02:00
Christoph M. Becker 418da85f15 Fix #71606: Segmentation fault mb_strcut with HTML-ENTITIES
The HTML decoding filter uses the `opaque` member of mbfl_convert_filter
as buffer, but there was no copy constructor defined, what caused double
frees when the filter is copied (what happens multiple times in mb_strcut(),
for instance).
2017-07-23 12:19:27 +02:00
Nikita Popov 9af5b7f33d Fix use after free in mb_send_mail 2017-07-23 11:55:26 +02:00
Anatol Belski 47334646db fix skipif 2017-07-23 11:08:11 +02:00
Sara Golemon 089f4ff885 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use compatability zend_isnan() instead of POSIX isnan()
2017-07-22 21:33:28 -04:00
Sara Golemon a4e3589966 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Use compatability zend_isnan() instead of POSIX isnan()
2017-07-22 21:33:20 -04:00
Sara Golemon 775b4b54d8 Use compatability zend_isnan() instead of POSIX isnan()
s/isnan/zend_isnan/g
2017-07-22 21:32:44 -04:00
Sara Golemon e23c132940 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix compile-time optimization of NAN comparisons
2017-07-22 21:23:29 -04:00
Sara Golemon 1229b0f8cb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fix compile-time optimization of NAN comparisons
2017-07-22 21:23:17 -04:00
Sara Golemon c562d44321 Fix compile-time optimization of NAN comparisons 2017-07-22 21:22:51 -04:00
Frank Denis 401188cbf9 sodium ext: require libsodium >= 1.0.8
(but really, 1.0.9 should be the bare minimum)
2017-07-22 22:07:53 +02:00
Frank Denis c499bd12f7 sodium ext: define crypto_aead_chacha20poly1305_ietf_KEYBYTES if needed
Some old libsodium versions didn't had a dedicated constant for the
IETF version of this construction.
2017-07-22 19:57:44 +02:00
Frank Denis 8a2e747a7b sodium ext: remove redundant and obsolete macros 2017-07-22 17:50:22 +02:00
Nikita Popov 4672411ef5 Fix incorrect propagation of ZEND_BOOL in pass 1
BOOL (next to QM_ASSIGN) is one of the opcodes that can assign to
a temporary that is assigned in multiple branches. Pass 1 does
not check for this, so we should not try to handle it at that
point. Block pass and sccp will be able to treat this correctly.
2017-07-22 17:23:50 +02:00
Nikita Popov 96665fbfe0 Fix block removal if there are duplicate successors 2017-07-22 14:53:23 +02:00
Anatol Belski 1e9ad4a307 [ci skip] update NEWS 2017-07-22 14:15:32 +02:00
Anatol Belski 3fc52f1dc4 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] update NEWS
  [ci skip] update NEWS
2017-07-22 14:14:22 +02:00
Anatol Belski c068818ff3 [ci skip] update NEWS 2017-07-22 14:13:51 +02:00
Anatol Belski e0c0007bd2 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  [ci skip] update NEWS
2017-07-22 14:13:25 +02:00
Anatol Belski ad12da4908 [ci skip] update NEWS 2017-07-22 14:12:45 +02:00
Bob Weinand 76ce874422 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-22 11:16:48 +02:00
Bob Weinand 134e713be2 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-22 11:14:54 +02:00
Bob Weinand bad5d0d6c5 Fixed bug #74954 (null deref and segfault in zend_generator_resume()) 2017-07-22 11:14:00 +02:00
Anatol Belski 14e8f9557b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class
2017-07-22 10:36:58 +02:00
Anatol Belski 4cb1151fff Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class
2017-07-22 10:36:31 +02:00
Anatol Belski e405ff59f9 Fixed bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class 2017-07-22 10:35:26 +02:00
Nikita Popov 3fa76ac54f Merge branch 'PHP-7.1' into PHP-7.2 2017-07-21 23:22:56 +02:00
Nikita Popov 69ec51eb02 Fix DFG construction for VERIFY_RETURN
`use` only contains uses prior to definition. This was not
honoured for VERIFY_RETURN with a temporary operand.

The test case only breaks on PHP 7.2.
2017-07-21 23:20:56 +02:00
Anatol Belski 7ec8b8d49f remove casts and ensure no out of bounds access 2017-07-21 22:26:37 +02:00
Frank Denis f8ffc9622b sodium ext: delete copypasta from sodium_crypto_kdf_derive_from_key()
/via @fredemmott
2017-07-21 18:25:25 +02:00
Frank Denis 0e2a7fc829 sodium ext: use crypto_scalarmult_BYTES for points coordinates
Just for consistency.
2017-07-21 14:02:33 +02:00
Frank Denis 557029e8e6 sodium ext: clear the hash state after we're done hashing 2017-07-21 14:02:26 +02:00
Frank Denis d8a14e2aad sodium ext: drop unused code
/via @remicollet
2017-07-21 14:02:18 +02:00
Xinchen Hui 735b34c016 Update NEWS 2017-07-21 18:17:54 +08:00
Xinchen Hui 01090e6ced Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces)
2017-07-21 18:17:33 +08:00
Xinchen Hui a8f98fc7f7 Update NEWS 2017-07-21 18:17:12 +08:00
Xinchen Hui 08177312fb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces)
2017-07-21 18:16:54 +08:00
Xinchen Hui 256ec5bebb Merge branch 'PHP-7.0' of git.php.net:/php-src into PHP-7.0
* 'PHP-7.0' of git.php.net:/php-src:
  Move the define into the header to reduce diff for future upgrade
2017-07-21 18:16:37 +08:00
Xinchen Hui 3a7b0027f3 Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces) 2017-07-21 18:16:11 +08:00
Anatol Belski 96ad72dc29 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Move the define into the header to reduce diff for future upgrade
2017-07-21 11:16:38 +02:00
Anatol Belski 4b3ed311aa Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Move the define into the header to reduce diff for future upgrade
2017-07-21 11:16:15 +02:00
Anatol Belski 9b3c26d4f4 Move the define into the header to reduce diff for future upgrade 2017-07-21 09:12:06 +02:00
Xinchen Hui 6242230219 Update NEWS 2017-07-21 12:03:17 +08:00
Xinchen Hui 463413db53 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWS
  Fixed bug #74947 (Segfault in scanner on INF number)

Conflicts:
	Zend/zend_language_scanner.c
2017-07-21 12:02:54 +08:00
Xinchen Hui e2b240c164 Update NEWS 2017-07-21 11:58:30 +08:00
Xinchen Hui 84926a0d71 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74947 (Segfault in scanner on INF number)

Conflicts:
	Zend/zend_language_scanner.c
2017-07-21 11:58:07 +08:00
Xinchen Hui 95d2908814 Fixed bug #74947 (Segfault in scanner on INF number) 2017-07-21 11:56:49 +08:00
Dmitry Stogov 0b2c456312 fixed comments 2017-07-20 23:29:22 +03:00
Dmitry Stogov 1b9d0c8af3 Fixed wrong edges_count re-calculation. 2017-07-20 23:28:05 +03:00
Anatol Belski b8eb110cd5 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  increment sdk version
2017-07-20 22:08:39 +02:00
Anatol Belski fa33b065ac Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  increment sdk version
2017-07-20 22:07:32 +02:00
Anatol Belski ce06677069 increment sdk version 2017-07-20 22:06:34 +02:00
Anatol Belski 2ec3c67428 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  remove another cygwin instance in AppVeyor run
2017-07-20 20:40:47 +02:00
Anatol Belski 7c21535fb3 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  remove another cygwin instance in AppVeyor run
2017-07-20 20:39:36 +02:00
Anatol Belski ecad9a470f remove another cygwin instance in AppVeyor run 2017-07-20 20:39:04 +02:00
Sergei Morozov 9b9184a45a Fixed bug #74941 - Session fails to start after having headers sent 2017-07-20 07:52:02 +01:00
Anatol Belski 18595b6fc6 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix dir separator in test
2017-07-19 22:42:05 +02:00
Anatol Belski 8ef5a50e2d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  fix dir separator in test
2017-07-19 22:41:32 +02:00
Anatol Belski f67a3cc9bd fix dir separator in test 2017-07-19 22:41:09 +02:00
Sara Golemon bb02f99e71 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Do not allow using traits/interfaces/abstract classes as stream wrappers
  Add oci8_failover.c to config.w32, follow up for commit 1b797f7a
2017-07-19 14:01:18 -04:00
Sara Golemon a9e8239f45 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Do not allow using traits/interfaces/abstract classes as stream wrappers
2017-07-19 14:01:00 -04:00
Sara Golemon c9fd093127 Do not allow using traits/interfaces/abstract classes as stream wrappers
Fixes https://bugs.php.net/bug.php?id=74951
2017-07-19 14:00:00 -04:00
Emmanuel Dreyfus d25049cc1b Fixed bug #74851: Improve uniqid() performance
uniqid() relies on microsecond-precise system clock to produce an
unique identifier. In order to avoid  using the same value, the
original implementation calls usleep(1) to wait for the next microsecond.

Unfortunately, usleep() specification says "The suspension time may be
longer than requested due to the scheduling of other activity by the
system." Indeed, the pause may as as long as an entire execution slice,
causing a uniqid() call to last more than 10 ms.

This is fixed by replacing the usleep() call by time polling using
gettimeofday() until the microsecond changes. Since the getttimeoday()
system call lasts around a microsecond, only a small time is wasted
calling multiple gettimeofday. On the benefit side, uniqid() performance
in increased 10000 fold without changing its behavior.
2017-07-19 19:54:19 +02:00
Lior Kaplan 2b36f3d71f Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add oci8_failover.c to config.w32, follow up for commit 1b797f7a
2017-07-19 17:26:38 +03:00
Lior Kaplan 2cca43b3ab Add oci8_failover.c to config.w32, follow up for commit 1b797f7a 2017-07-19 17:23:22 +03:00
Dmitry Stogov 6fcc7134f1 Keep resource of enclosing stream, because it may be referenced from other place(s).
This fixes valgrind warnings on Zend/tests/type_declarations/scalar_basic.phpt
2017-07-19 17:16:56 +03:00
Dmitry Stogov 112eda7525 Separate the fast-patch 2017-07-19 15:42:32 +03:00
Dmitry Stogov 3185f8628f Convert CONCAT into FAST_CONCAT for non-object operands 2017-07-19 15:41:46 +03:00
Dmitry Stogov 95a1f77b5e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Reset globals on startup or restart
2017-07-19 15:36:48 +03:00
Dmitry Stogov 4252f14299 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Reset globals on startup or restart
2017-07-19 15:36:24 +03:00
Dmitry Stogov e5beb4e828 Reset globals on startup or restart 2017-07-19 15:35:10 +03:00
Dmitry Stogov 8447b86eef Remove dead live ranges and FREE instructions 2017-07-19 13:07:33 +03:00
Dmitry Stogov 5274cefb4d Remove live ranges 2017-07-19 13:06:25 +03:00
Nikita Popov ecb67e59d7 Don't reuse compare_function operands
If the same zval is used for the result and one operand, then the
function thinks it is responsible for freeing the value in case of
a type conversion.
2017-07-19 01:04:36 +02:00
Sergei Morozov 5b12b46a19 Fixed bug #74936 - session_*() functions trigger a warning in read mode when the session is active 2017-07-18 22:25:22 +02:00
Nikita Popov a624ded4d3 Merge branch 'PHP-7.1' into PHP-7.2 2017-07-18 22:16:33 +02:00
Nikita Popov 8e7c99acf4 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-18 22:16:11 +02:00
andrewnester afc22828ea Fixed #74699 - Broken ArrayIterator unserializing 2017-07-18 22:14:11 +02:00
Nikita Popov f9d6cff67e Merge branch 'PHP-7.1' into PHP-7.2 2017-07-18 21:45:41 +02:00
Nikita Popov 4e9158da76 Merge branch 'PHP-7.0' into PHP-7.1 2017-07-18 21:45:35 +02:00
YaoGuai 51cdd3dc50 Fix check of mysql_commit() return value
For mysql_commit() everything non-zero is an error.
2017-07-18 21:45:02 +02:00
Nikita Popov 9cd82df0bb Merge branch 'PHP-7.1' into PHP-7.2 2017-07-18 21:21:46 +02:00
Andrew Nester 6c32d271d2 Fixed #74892 - Fixed URL rewriting for urls started with # 2017-07-18 21:20:03 +02:00
Dmitry Stogov 0903f6bffb Remove dead JMP/JMPZ/JMPNZ/JMPZNZ (DCE pass can't remove them) 2017-07-18 20:43:06 +03:00
Dmitry Stogov 582882ae18 Constant evaluation of few more constant functions 2017-07-18 20:42:40 +03:00
Dmitry Stogov c41d2535b1 Disabled compile-time constant DOUBLE to STRING evaluation (its result depends on run-time 'precision' setting) 2017-07-18 20:41:01 +03:00
Joe Watkins f4323248ec bump versions 2017-07-18 17:21:19 +01:00
Sara Golemon b01448f9a6 Update NEWS for 7.2.0beta2 2017-07-18 16:00:34 +00:00
222 changed files with 13521 additions and 8892 deletions

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ environment:
PHP_BUILD_CACHE_BASE_DIR: c:\build-cache
PHP_BUILD_OBJ_DIR: c:\obj
PHP_BUILD_CACHE_SDK_DIR: c:\build-cache\sdk
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.7
PHP_BUILD_SDK_BRANCH: php-sdk-2.0.9
PHP_BUILD_CRT: vc15
# ext and env setup for tests
#MYSQL_TEST_PASSWD: Password12!
+4 -4
View File
@@ -93,12 +93,12 @@ User Functions/Methods Naming Conventions
readability of the function name itself::
Good:
'mcrypt_enc_self_test'
'mysql_list_fields'
'str_word_count'
'array_key_exists'
Ok:
'mcrypt_module_get_algo_supported_key_sizes'
(could be 'mcrypt_mod_get_algo_sup_key_sizes'?)
'date_interval_create_from_date_string'
(could be 'date_intvl_create_from_date_str'?)
'get_html_translation_table'
(could be 'html_get_trans_table'?)
+107
View File
@@ -1,5 +1,112 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
17 Aug 2017, PHP 7.2.0beta3
- Core:
. Fixed bug #75063 (Main CWD initialized with wrong codepage). (Anatol)
- Date:
. Fixed bug #75002 (Null Pointer Dereference in timelib_time_clone). (Derick)
- FTP:
. Added ftp_append() function. (blar)
- Mbstring:
. Fixed bug #75001 (Wrong reflection on mb_eregi_replace). (Fabien
Villepinte)
- SQLite3:
. Updated to SQLite 3.20.0. (cmb)
- SPL:
. Fixed bug #75049 (spl_autoload_unregister can't handle
spl_autoload_functions results). (Laruence)
. Added spl_object_id(). (Tyson Andre)
- Standard:
. Fixed bug #75075 (unpack with X* causes infinity loop). (Laruence)
. Fixed bug #74103 (heap-use-after-free when unserializing invalid array
size). (Nikita)
. Fixed bug #75054 (A Denial of Service Vulnerability was found when
performing deserialization). (Nikita)
- WDDX:
. Fixed bug #73793 (WDDX uses wrong decimal seperator). (cmb)
- XMLRPC:
. Fixed bug #74975 (Incorrect xmlrpc serialization for classes with declared
properties). (blar)
03 Aug 2017, PHP 7.2.0beta2
- Core:
. Implemented FR #74963 (Improved error message on fetching property of
non-object). (Laruence)
. Fixed bug #74947 (Segfault in scanner on INF number). (Laruence)
. Fixed bug #74954 (null deref and segfault in zend_generator_resume()). (Bob)
- CLI:
. Fixed bug #74979 (Interactive shell opening instead of script execution
with -f flag). (Anatol)
- cURL:
. Fixed bug #74125 (Fixed finding CURL on systems with multiarch support).
(cebe)
- Intl:
. Fixed bug #74993 (Wrong reflection on some locale_* functions). (Sara)
- Mbstring:
. Fixed bug #69267 (mb_strtolower fails on titlecase characters). (Nikita)
. Fixed bug #71606 (Segmentation fault mb_strcut with HTML-ENTITIES encoding).
(cmb)
. Fixed bug #62934 (mb_convert_kana() does not convert iteration marks).
(Nikita)
- MySQLi:
. Fixed bug #74968 (PHP crashes when calling mysqli_result::fetch_object with
an abstract class). (Anatol)
- OCI8:
. Expose oci_unregister_taf_callback() (Tianfang Yang)
- Opcache:
. Fixed bug #74980 (Narrowing occurred during type inference). (Laruence)
- OpenSSL:
. Fixed bug #74903 (openssl_pkcs7_encrypt() uses different EOL than before).
(Anatol)
- phar:
. Fixed bug #74991 (include_path has a 4096 char limit in some cases).
(bwbroersma)
- Reflection:
. Fixed bug #74949 (null pointer dereference in _function_string). (Laruence)
- Session:
. Fixed bug #74892 (Url Rewriting (trans_sid) not working on urls that start
with "#"). (Andrew Nester)
. Fixed bug #74936 (session_cache_expire/cache_limiter/save_path() trigger a
warning in read mode). (morozov)
. Fixed bug #74941 (session fails to start after having headers sent).
(morozov)
. Fixed bug #74833 (SID constant created with wrong module number). (Anatol)
- SimpleXML:
. Fixed bug #74950 (nullpointer deref in simplexml_element_getDocNamespaces).
(Laruence)
- SPL:
. Fixed bug #74669 (Unserialize ArrayIterator broken). (Andrew Nester)
. Fixed bug #74977 (Appending AppendIterator leads to segfault).
(Andrew Nester)
. Fixed bug #75015 (Crash in recursive iterator destructors). (Julien)
- Standard:
. Fixed bug #74851 (uniqid() without more_entropy performs badly).
(Emmanuel Dreyfus)
20 Jul 2017, PHP 7.2.0beta1
- Core:
+7 -2
View File
@@ -25,7 +25,7 @@ PHP 7.2 UPGRADE NOTES
. is_object() will now return true for objects of class
__PHP_Incomplete_Class.
. Support for Netware operating systems have been removed.
. Casting arrays to objects (with (object) or settype()) will now covert
. Casting arrays to objects (with (object) or settype()) will now convert
integer keys to string property names. This fixes the behaviour of previous
versions, where integer keys would become inaccessible properties with
integer names.
@@ -161,7 +161,7 @@ All the deprecated functionality listed in the following will be removed in
PHP 8.0.
- Core:
. The trace_errors ini directive has been deprecated.
. The track_errors ini directive has been deprecated.
. The __autoload() mechanism has been deprecated, use spl_autoload_register()
instead.
. The (unset) cast has been deprecated. This does not affect the unset($var)
@@ -169,6 +169,8 @@ PHP 8.0.
. The create_function() function has been deprecated, use anonymous functions
instead.
. The each() function has been deprecated, use a foreach loop instead.
. The $errcontext error handler argument has been deprecated. However, using
it does not trigger a deprecation warning for technical reasons.
- EXIF:
. The read_exif_data() alias have been deprecated, use exif_read_data() instead.
@@ -233,6 +235,9 @@ See also: https://wiki.php.net/rfc/deprecations_php_7_2
. DomNodeList implements Countable, added DomNodeList::count().
. DOMNamedNodeMap implements Countable, added DOMNamedNodeMap::count().
- FTP:
. Added ftp_append().
- GD:
. Added imagesetclip() and imagegetclip().
. Added imageopenpolygon().
+4 -4
View File
@@ -37,15 +37,15 @@ NULL
Notice: Undefined variable: b in %s on line %d
int(1)
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '1' of non-object in %s on line %d
NULL
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '1' of non-object in %s on line %d
NULL
Notice: Undefined variable: c in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '1' of non-object in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '' of non-object in %s on line %d
NULL
+1 -1
View File
@@ -18,7 +18,7 @@ print "ok\n";
?>
--EXPECTF--
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'a' of non-object in %s on line %d
ok
Warning: Creating default object from empty value in %s on line %d
+1 -1
View File
@@ -24,7 +24,7 @@ Notice: Undefined variable: arr in %s on line %d
Notice: Undefined variable: arr in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'foo' of non-object in %s on line %d
Warning: Creating default object from empty value in %s on line %d
+2 -2
View File
@@ -49,8 +49,8 @@ NULL
Warning: Cannot use a scalar value as an array in %s on line %d
NULL
Warning: Attempt to assign property of non-object in %s on line %d
Warning: Attempt to assign property 'foo' of non-object in %s on line %d
NULL
Warning: Attempt to assign property of non-object in %s on line %d
Warning: Attempt to assign property 'foo' of non-object in %s on line %d
NULL
+2 -2
View File
@@ -44,7 +44,7 @@ ok
ok
ok
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'wrong' of non-object in %s on line %d
ok
Warning: Illegal string offset 'wrong' in %s on line %d
@@ -52,4 +52,4 @@ ok
ok
Warning: Illegal string offset 'wrong' in %s on line %d
ok
ok
+1 -1
View File
@@ -8,7 +8,7 @@ foreach($x->a->b as &$v) {
echo "ok\n";
?>
--EXPECTF--
Warning: Attempt to modify property of non-object in %sbug36303.php on line 3
Warning: Attempt to modify property 'a' of non-object in %sbug36303.php on line 3
Warning: Invalid argument supplied for foreach() in %sbug36303.php on line 3
ok
+6 -6
View File
@@ -28,22 +28,22 @@ var_dump($a);
?>
--EXPECTF--
--> read access:
Notice: Trying to get property of non-object in %sbug44660.php on line 6
Notice: Trying to get property 'p' of non-object in %sbug44660.php on line 6
--> direct assignment:
Warning: Attempt to assign property of non-object in %sbug44660.php on line 9
Warning: Attempt to assign property 'p' of non-object in %sbug44660.php on line 9
--> increment:
Warning: Attempt to increment/decrement property of non-object in %sbug44660.php on line 12
Warning: Attempt to increment/decrement property 'p' of non-object in %sbug44660.php on line 12
--> reference assignment:
Warning: Attempt to modify property of non-object in %sbug44660.php on line 15
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 15
--> reference assignment:
Warning: Attempt to modify property of non-object in %sbug44660.php on line 18
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 18
--> indexed assignment:
Warning: Attempt to modify property of non-object in %sbug44660.php on line 21
Warning: Attempt to modify property 'p' of non-object in %sbug44660.php on line 21
--> Confirm assignments have had no impact:
bool(true)
+1 -1
View File
@@ -7,5 +7,5 @@ $a->{"a"."b"};
--EXPECTF--
Notice: Undefined variable: a in %sbug47109.php on line 2
Notice: Trying to get property of non-object in %sbug47109.php on line 2
Notice: Trying to get property 'ab' of non-object in %sbug47109.php on line 2
+1 -1
View File
@@ -8,5 +8,5 @@ var_dump($data);
?>
--EXPECTF--
Warning: Attempt to modify property of non-object in %sbug52237.php on line 3
Warning: Attempt to modify property 'info' of non-object in %sbug52237.php on line 3
string(4) "test"
+1 -1
View File
@@ -11,7 +11,7 @@ echo "ok\n";
--EXPECTF--
bool(false)
Warning: Attempt to modify property of non-object in %sbug54262.php on line 4
Warning: Attempt to modify property 'a' of non-object in %sbug54262.php on line 4
Warning: Cannot use a scalar value as an array in %sbug54262.php on line 5
ok
+2 -2
View File
@@ -11,7 +11,7 @@ var_dump($b);
?>
--EXPECTF--
Warning: Attempt to modify property of non-object in %sbug72911.php on line %d
Warning: Attempt to modify property 'b' of non-object in %sbug72911.php on line %d
Warning: Attempt to assign property of non-object in %sbug72911.php on line %d
Warning: Attempt to assign property 'i' of non-object in %sbug72911.php on line %d
NULL
+12
View File
@@ -0,0 +1,12 @@
--TEST--
Bug #74947 (Segfault in scanner on INF number)
--FILE--
<?php
echo 200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
echo -200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;
?>
--EXPECTF--
INF-INF
+2 -2
View File
@@ -27,8 +27,8 @@ var_dump($h);
?>
--EXPECTF--
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'a' of non-object in %s on line %d
NULL
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'b' of non-object in %s on line %d
NULL
+45
View File
@@ -0,0 +1,45 @@
--TEST--
Bug #74954 (crash after update of generator yielding from finished generator)
--FILE--
<?php
function from() {
yield 1;
throw new Exception();
}
function gen($gen) {
try {
var_dump(yield from $gen);
} catch (Exception $e) { print "Caught exception!\n$e\n"; }
}
$gen = from();
$gens[] = gen($gen);
$gens[] = gen($gen);
foreach ($gens as $g) {
$g->current();
}
do {
foreach ($gens as $i => $g) {
$g->next();
}
} while($gens[0]->valid());
?>
--EXPECTF--
Caught exception!
Exception in %s:%d
Stack trace:
#0 %s(%d): from()
#1 [internal function]: gen(Object(Generator))
#2 %s(%d): Generator->next()
#3 {main}
Caught exception!
ClosedGeneratorException: Generator yielded from aborted, no return value available in %s:%d
Stack trace:
#0 [internal function]: gen(Object(Generator))
#1 %s(%d): Generator->next()
#2 {main}
+1 -1
View File
@@ -33,7 +33,7 @@ Notice: Undefined variable: c in %s on line %d
Notice: Undefined variable: d in %s on line %d
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property '' of non-object in %s on line %d
bool(false)
bool(true)
bool(false)
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Attempt to free invalid structure (result of ROPE_INIT is not a zval)
--FILE--
<?php
set_error_handler(function () {
throw new Exception();
});
$a = [];
$b = "";
try {
echo "$a$b\n";
} catch (Exception $ex) {
}
?>
DONE
--EXPECT--
DONE
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Live ranges should be ordered according to "start" position
--FILE--
<?php
set_error_handler(function($no, $msg) { throw new Exception; });
try {
$a = [];
$str = "$a${"y$a$a"}y";
} catch (Exception $e) {
}
?>
DONE
--EXPECT--
DONE
@@ -7,4 +7,4 @@ Cannot take property of a string
?>
--EXPECTF--
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'bar' of non-object in %s on line %d
+5 -1
View File
@@ -717,6 +717,10 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
extern zend_php_scanner_globals language_scanner_globals;
#endif
#ifdef ZEND_WIN32
php_win32_cp_set_by_id(65001);
#endif
start_memory_manager();
virtual_cwd_startup(); /* Could use shutdown to free the main cwd but it would just slow it down for CGI */
@@ -769,7 +773,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
zend_compile_file = compile_file;
zend_execute_ex = execute_ex;
zend_execute_internal = NULL;
#endif /* HAVE_SYS_SDT_H */
#endif /* HAVE_DTRACE */
zend_compile_string = compile_string;
zend_throw_exception_hook = NULL;
+1 -1
View File
@@ -7844,7 +7844,7 @@ static void zend_compile_encaps_list(znode *result, zend_ast *ast) /* {{{ */
GET_NODE(result, opline->result);
} else {
uint32_t var;
uint32_t range = zend_start_live_range(CG(active_op_array), rope_init_lineno);
uint32_t range = zend_start_live_range_ex(CG(active_op_array), rope_init_lineno);
init_opline->extended_value = j;
opline->opcode = ZEND_ROPE_END;
+3 -1
View File
@@ -1886,7 +1886,9 @@ static zend_always_inline void zend_fetch_property_address(zval *result, zval *c
object_init(container);
} else {
if (container_op_type != IS_VAR || EXPECTED(!Z_ISERROR_P(container))) {
zend_error(E_WARNING, "Attempt to modify property of non-object");
zend_string *property_name = zval_get_string(prop_ptr);
zend_error(E_WARNING, "Attempt to modify property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
}
ZVAL_ERROR(result);
return;
+2 -4
View File
@@ -753,15 +753,13 @@ failure:
ZEND_API void zend_generator_resume(zend_generator *orig_generator) /* {{{ */
{
zend_generator *generator;
zend_generator *generator = zend_generator_get_current(orig_generator);
/* The generator is already closed, thus can't resume */
if (UNEXPECTED(!orig_generator->execute_data)) {
if (UNEXPECTED(!generator->execute_data)) {
return;
}
generator = zend_generator_get_current(orig_generator);
try_again:
if (generator->flags & ZEND_GENERATOR_CURRENTLY_RUNNING) {
zend_throw_error(NULL, "Cannot resume an already running generator");
File diff suppressed because it is too large. Load diff
-2
View File
@@ -1663,7 +1663,6 @@ NEWLINE ("\r"|"\n"|"\r\n")
if (errno == ERANGE) { /* Overflow */
errno = 0;
if (yytext[0] == '0') { /* octal overflow */
errno = 0;
ZVAL_DOUBLE(zendlval, zend_oct_strtod(yytext, (const char **)&end));
} else {
ZVAL_DOUBLE(zendlval, zend_strtod(yytext, (const char **)&end));
@@ -1675,7 +1674,6 @@ NEWLINE ("\r"|"\n"|"\r\n")
ZVAL_UNDEF(zendlval);
RETURN_TOKEN(T_DNUMBER);
}
ZEND_ASSERT(!errno);
RETURN_TOKEN(T_DNUMBER);
}
/* Also not an assert for the same reason */
+1 -1
View File
@@ -476,7 +476,7 @@ static zend_always_inline double _zend_get_nan(void) /* {{{ */
#define ZEND_STRL(str) (str), (sizeof(str)-1)
#define ZEND_STRS(str) (str), (sizeof(str))
#define ZEND_NORMALIZE_BOOL(n) \
((n) ? (((n)>0) ? 1 : -1) : 0)
((n) ? (((n)<0) ? -1 : 1) : 0)
#define ZEND_TRUTH(x) ((x) ? 1 : 0)
#define ZEND_LOG_XOR(a, b) (ZEND_TRUTH(a) ^ ZEND_TRUTH(b))
+4
View File
@@ -72,6 +72,10 @@ typedef unsigned long int uint32_t;
#define NO_INFNAN_CHECK
#endif
#ifndef NO_ERRNO
#define NO_ERRNO
#endif
#ifdef WORDS_BIGENDIAN
#define IEEE_BIG_ENDIAN 1
#else
+12 -2
View File
@@ -389,16 +389,21 @@ static void cwd_globals_dtor(virtual_cwd_globals *cwd_g) /* {{{ */
}
/* }}} */
CWD_API void virtual_cwd_startup(void) /* {{{ */
void virtual_cwd_main_cwd_init(uint8_t reinit) /* {{{ */
{
char cwd[MAXPATHLEN];
char *result;
if (reinit) {
free(main_cwd_state.cwd);
}
#ifdef ZEND_WIN32
ZeroMemory(&cwd, sizeof(cwd));
#endif
result = php_win32_ioutil_getcwd(cwd, sizeof(cwd));
#else
result = getcwd(cwd, sizeof(cwd));
#endif
if (!result) {
cwd[0] = '\0';
@@ -411,7 +416,12 @@ CWD_API void virtual_cwd_startup(void) /* {{{ */
}
#endif
main_cwd_state.cwd = strdup(cwd);
}
/* }}} */
CWD_API void virtual_cwd_startup(void) /* {{{ */
{
virtual_cwd_main_cwd_init(0);
#ifdef ZTS
ts_allocate_id(&cwd_globals_id, sizeof(virtual_cwd_globals), (ts_allocate_ctor) cwd_globals_ctor, (ts_allocate_dtor) cwd_globals_dtor);
#else
+4
View File
@@ -238,6 +238,10 @@ CWD_API zend_long realpath_cache_size(void);
CWD_API zend_long realpath_cache_max_buckets(void);
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(void);
#ifdef CWD_EXPORTS
extern void virtual_cwd_main_cwd_init(uint8_t);
#endif
/* The actual macros to be used in programs using TSRM
* If the program defines VIRTUAL_DIR it will use the
* virtual_* functions
+86 -26
View File
@@ -811,7 +811,9 @@ ZEND_VM_HELPER(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV,
if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
if (UNEXPECTED(!make_real_object(object))) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
zend_string *property_name = zval_get_string(property);
zend_error(E_WARNING, "Attempt to assign property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -1070,7 +1072,9 @@ ZEND_VM_HELPER(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV,
if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
if (UNEXPECTED(!make_real_object(object))) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
zend_string *property_name = zval_get_string(property);
zend_error(E_WARNING, "Attempt to increment/decrement property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -1147,7 +1151,9 @@ ZEND_VM_HELPER(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMPVAR|CV,
if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
ZVAL_DEREF(object);
if (UNEXPECTED(!make_real_object(object))) {
zend_error(E_WARNING, "Attempt to increment/decrement property of non-object");
zend_string *property_name = zval_get_string(property);
zend_error(E_WARNING, "Attempt to increment/decrement property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
ZVAL_NULL(EX_VAR(opline->result.var));
break;
}
@@ -1802,8 +1808,11 @@ ZEND_VM_HANDLER(82, ZEND_FETCH_OBJ_R, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR
}
if (UNEXPECTED(zobj->handlers->read_property == NULL)) {
zend_string *property_name;
ZEND_VM_C_LABEL(fetch_obj_r_no_object):
zend_error(E_NOTICE, "Trying to get property of non-object");
property_name = zval_get_string(offset);
zend_error(E_NOTICE, "Trying to get property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
ZVAL_NULL(EX_VAR(opline->result.var));
} else {
retval = zobj->handlers->read_property(container, offset, BP_VAR_R, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(offset)) : NULL), EX_VAR(opline->result.var));
@@ -2014,7 +2023,7 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, SPEC(
{
USE_OPLINE
zend_free_op free_op1, free_op2, free_op_data;
zval *object, *property_name, *value, tmp;
zval *object, *property, *value, tmp;
SAVE_OPLINE();
object = GET_OP1_OBJ_ZVAL_PTR_PTR_UNDEF(BP_VAR_W);
@@ -2023,7 +2032,7 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, SPEC(
ZEND_VM_DISPATCH_TO_HELPER(zend_this_not_in_object_context_helper);
}
property_name = GET_OP2_ZVAL_PTR(BP_VAR_R);
property = GET_OP2_ZVAL_PTR(BP_VAR_R);
value = GET_OP_DATA_ZVAL_PTR(BP_VAR_R);
if (OP1_TYPE != IS_UNUSED && UNEXPECTED(Z_TYPE_P(object) != IS_OBJECT)) {
@@ -2055,7 +2064,9 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, SPEC(
Z_DELREF_P(object);
} else {
if (OP1_TYPE != IS_VAR || EXPECTED(!Z_ISERROR_P(object))) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
zend_string *property_name = zval_get_string(property);
zend_error(E_WARNING, "Attempt to assign property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
}
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
@@ -2067,16 +2078,16 @@ ZEND_VM_HANDLER(136, ZEND_ASSIGN_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, SPEC(
}
if (OP2_TYPE == IS_CONST &&
EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property_name)))) {
uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property_name) + sizeof(void*));
EXPECTED(Z_OBJCE_P(object) == CACHED_PTR(Z_CACHE_SLOT_P(property)))) {
uint32_t prop_offset = (uint32_t)(intptr_t)CACHED_PTR(Z_CACHE_SLOT_P(property) + sizeof(void*));
zend_object *zobj = Z_OBJ_P(object);
zval *property;
zval *property_val;
if (EXPECTED(prop_offset != (uint32_t)ZEND_DYNAMIC_PROPERTY_OFFSET)) {
property = OBJ_PROP(zobj, prop_offset);
if (Z_TYPE_P(property) != IS_UNDEF) {
property_val = OBJ_PROP(zobj, prop_offset);
if (Z_TYPE_P(property_val) != IS_UNDEF) {
ZEND_VM_C_LABEL(fast_assign_obj):
value = zend_assign_to_variable(property, value, OP_DATA_TYPE);
value = zend_assign_to_variable(property_val, value, OP_DATA_TYPE);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
@@ -2090,8 +2101,8 @@ ZEND_VM_C_LABEL(fast_assign_obj):
}
zobj->properties = zend_array_dup(zobj->properties);
}
property = zend_hash_find(zobj->properties, Z_STR_P(property_name));
if (property) {
property_val = zend_hash_find(zobj->properties, Z_STR_P(property));
if (property_val) {
ZEND_VM_C_GOTO(fast_assign_obj);
}
}
@@ -2129,7 +2140,7 @@ ZEND_VM_C_LABEL(fast_assign_obj):
Z_ADDREF_P(value);
}
}
zend_hash_add_new(zobj->properties, Z_STR_P(property_name), value);
zend_hash_add_new(zobj->properties, Z_STR_P(property), value);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
}
@@ -2139,7 +2150,9 @@ ZEND_VM_C_LABEL(fast_assign_obj):
}
if (!Z_OBJ_HT_P(object)->write_property) {
zend_error(E_WARNING, "Attempt to assign property of non-object");
zend_string *property_name = zval_get_string(property);
zend_error(E_WARNING, "Attempt to assign property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_NULL(EX_VAR(opline->result.var));
}
@@ -2151,7 +2164,7 @@ ZEND_VM_C_LABEL(fast_assign_obj):
ZVAL_DEREF(value);
}
Z_OBJ_HT_P(object)->write_property(object, property_name, value, (OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property_name)) : NULL);
Z_OBJ_HT_P(object)->write_property(object, property, value, (OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(property)) : NULL);
if (UNEXPECTED(RETURN_VALUE_USED(opline))) {
ZVAL_COPY(EX_VAR(opline->result.var), value);
@@ -2667,8 +2680,51 @@ ZEND_VM_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
zval *op1, *op2;
zend_string *op1_str, *op2_str, *str;
SAVE_OPLINE();
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if ((OP1_TYPE == IS_CONST || EXPECTED(Z_TYPE_P(op1) == IS_STRING)) &&
(OP2_TYPE == IS_CONST || EXPECTED(Z_TYPE_P(op2) == IS_STRING))) {
zend_string *op1_str = Z_STR_P(op1);
zend_string *op2_str = Z_STR_P(op2);
zend_string *str;
do {
if (OP1_TYPE != IS_CONST) {
if (UNEXPECTED(ZSTR_LEN(op1_str) == 0)) {
ZVAL_STR_COPY(EX_VAR(opline->result.var), op2_str);
FREE_OP1();
break;
}
}
if (OP2_TYPE != IS_CONST) {
if (UNEXPECTED(ZSTR_LEN(op2_str) == 0)) {
ZVAL_STR_COPY(EX_VAR(opline->result.var), op1_str);
FREE_OP1();
break;
}
}
if (OP1_TYPE != IS_CONST && OP1_TYPE != IS_CV &&
!ZSTR_IS_INTERNED(op1_str) && GC_REFCOUNT(op1_str) == 1) {
size_t len = ZSTR_LEN(op1_str);
str = zend_string_extend(op1_str, len + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str) + len, ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
break;
} else {
str = zend_string_alloc(ZSTR_LEN(op1_str) + ZSTR_LEN(op2_str), 0);
memcpy(ZSTR_VAL(str), ZSTR_VAL(op1_str), ZSTR_LEN(op1_str));
memcpy(ZSTR_VAL(str) + ZSTR_LEN(op1_str), ZSTR_VAL(op2_str), ZSTR_LEN(op2_str)+1);
ZVAL_NEW_STR(EX_VAR(opline->result.var), str);
}
FREE_OP1();
} while (0);
FREE_OP2();
ZEND_VM_NEXT_OPCODE();
}
SAVE_OPLINE();
if (OP1_TYPE == IS_CONST) {
op1_str = Z_STR_P(op1);
} else if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) {
@@ -2679,7 +2735,6 @@ ZEND_VM_HANDLER(53, ZEND_FAST_CONCAT, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
}
op1_str = _zval_get_string_func(op1);
}
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (OP2_TYPE == IS_CONST) {
op2_str = Z_STR_P(op2);
} else if (EXPECTED(Z_TYPE_P(op2) == IS_STRING)) {
@@ -5555,7 +5610,9 @@ ZEND_VM_HANDLER(76, ZEND_UNSET_OBJ, VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV)
if (Z_OBJ_HT_P(container)->unset_property) {
Z_OBJ_HT_P(container)->unset_property(container, offset, ((OP2_TYPE == IS_CONST) ? CACHE_ADDR(Z_CACHE_SLOT_P(offset)) : NULL));
} else {
zend_error(E_NOTICE, "Trying to unset property of non-object");
zend_string *property_name = zval_get_string(offset);
zend_error(E_NOTICE, "Trying to unset property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
}
} while (0);
@@ -6447,7 +6504,9 @@ ZEND_VM_HANDLER(148, ZEND_ISSET_ISEMPTY_PROP_OBJ, CONST|TMPVAR|UNUSED|THIS|CV, C
}
}
if (UNEXPECTED(!Z_OBJ_HT_P(container)->has_property)) {
zend_error(E_NOTICE, "Trying to check property of non-object");
zend_string *property_name = zval_get_string(offset);
zend_error(E_NOTICE, "Trying to check property '%s' of non-object", ZSTR_VAL(property_name));
zend_string_release(property_name);
ZEND_VM_C_LABEL(isset_no_object):
result = ((opline->extended_value & ZEND_ISSET) == 0);
} else {
@@ -7021,6 +7080,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
if (throw_op->result_type & (IS_VAR | IS_TMP_VAR)) {
switch (throw_op->opcode) {
case ZEND_ADD_ARRAY_ELEMENT:
case ZEND_ROPE_INIT:
case ZEND_ROPE_ADD:
break; /* exception while building structures, live range handling will free those */
@@ -8050,13 +8110,13 @@ ZEND_VM_HANDLER(189, ZEND_IN_ARRAY, CONST|TMP|VAR|CV, CONST, NUM)
result = zend_hash_exists(ht, ZSTR_EMPTY_ALLOC());
} else {
zend_string *key;
zval tmp;
zval key_tmp, result_tmp;
result = 0;
ZEND_HASH_FOREACH_STR_KEY(ht, key) {
ZVAL_STR(&tmp, key);
compare_function(&tmp, op1, &tmp);
if (Z_LVAL(tmp) == 0) {
ZVAL_STR(&key_tmp, key);
compare_function(&result_tmp, op1, &key_tmp);
if (Z_LVAL(result_tmp) == 0) {
result = 1;
break;
}
+1265 -601
View File
File diff suppressed because it is too large. Load diff
+2
View File
@@ -2,6 +2,8 @@
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin >NUL 2>NUL
if %errorlevel% neq 0 exit /b 3
if "%APPVEYOR%" equ "True" rmdir /s /q C:\cygwin64 >NUL 2>NUL
if %errorlevel% neq 0 exit /b 3
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw >NUL 2>NUL
if %errorlevel% neq 0 exit /b 3
if "%APPVEYOR%" equ "True" rmdir /s /q C:\mingw-w64 >NUL 2>NUL
+1 -1
View File
@@ -108,7 +108,7 @@ int zend_sprintf(char *buffer, const char *format, ...);
PHP_MAJOR_VERSION=7
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=0
PHP_EXTRA_VERSION="-dev"
PHP_EXTRA_VERSION="beta3"
PHP_VERSION="$PHP_MAJOR_VERSION.$PHP_MINOR_VERSION.$PHP_RELEASE_VERSION$PHP_EXTRA_VERSION"
PHP_VERSION_ID=`expr [$]PHP_MAJOR_VERSION \* 10000 + [$]PHP_MINOR_VERSION \* 100 + [$]PHP_RELEASE_VERSION`
+19 -3
View File
@@ -17,11 +17,23 @@ if test "$PHP_CURL" != "no"; then
break
fi
done
if test -z "$CURL_DIR"; then
AC_MSG_RESULT(not found)
if which dpkg-architecture>/dev/null; then
AC_MSG_CHECKING(for cURL in multiarch path)
CURL_MULTIARCH_INCLUDE=/usr/include/$(dpkg-architecture -qDEB_HOST_MULTIARCH)
if test -r $CURL_MULTIARCH_INCLUDE/curl/easy.h; then
CURL_DIR=/usr
AC_MSG_RESULT(found in $CURL_MULTIARCH_INCLUDE)
else
AC_MSG_RESULT(not found)
fi
fi
fi
fi
if test -z "$CURL_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the libcurl distribution -
AC_MSG_ERROR(Could not find cURL, please reinstall the libcurl distribution -
easy.h should be in <curl-dir>/include/curl/)
fi
@@ -45,7 +57,11 @@ if test "$PHP_CURL" != "no"; then
AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support)
fi
PHP_ADD_INCLUDE($CURL_DIR/include)
if test -z "$CURL_MULTIARCH_INCLUDE"; then
PHP_ADD_INCLUDE($CURL_DIR/include)
else
PHP_ADD_INCLUDE($CURL_MULTIARCH_INCLUDE)
fi
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD)
+4
View File
@@ -1962,6 +1962,10 @@ static void date_period_it_rewind(zend_object_iterator *iter)
if (iterator->object->current) {
timelib_time_dtor(iterator->object->current);
}
if (!iterator->object->start) {
zend_throw_error(NULL, "DatePeriod has not been initialized correctly");
return;
}
iterator->object->current = timelib_time_clone(iterator->object->start);
date_period_it_invalidate_current(iter);
}
+22
View File
@@ -0,0 +1,22 @@
--TEST--
Bug #75002 Null Pointer Dereference in timelib_time_clone
--FILE--
<?php
class aaa extends DatePeriod {
public function __construct() { }
}
$start=new DateTime( '2012-08-01' );
foreach (new aaa($start) as $y) {
$a=$key;
}
?>
==DONE==
--EXPECTF--
Fatal error: Uncaught Error: DatePeriod has not been initialized correctly in %sbug75002.php:%d
Stack trace:
#0 {main}
thrown in %sbug75002.php on line %d
+2 -2
View File
@@ -56,7 +56,7 @@ bool(false)
testing property access
string(4) "data"
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'textContent' of non-object in %s on line %d
NULL
testing offset not a long
array(1) {
@@ -64,7 +64,7 @@ array(1) {
string(4) "test"
}
Notice: Trying to get property of non-object in %s on line %d
Notice: Trying to get property 'textContent' of non-object in %s on line %d
bool(false)
NULL
array(1) {
+2 -2
View File
@@ -1973,11 +1973,11 @@ static void exif_error_docref(const char *docref EXIFERR_DC, const image_info_ty
char *buf;
spprintf(&buf, 0, "%s(%d): %s", _file, _line, format);
php_verror(docref, ImageInfo->FileName?ImageInfo->FileName:"", type, buf, args);
php_verror(docref, ImageInfo && ImageInfo->FileName ? ImageInfo->FileName:"", type, buf, args);
efree(buf);
}
#else
php_verror(docref, ImageInfo->FileName?ImageInfo->FileName:"", type, format, args);
php_verror(docref, ImageInfo && ImageInfo->FileName ? ImageInfo->FileName:"", type, format, args);
#endif
va_end(args);
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 18 KiB

+1 -1
View File
@@ -12,5 +12,5 @@ var_dump(count(exif_read_data(__DIR__."/bug62523_1.jpg")));
Done
--EXPECT--
Test
int(86)
int(84)
Done
Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 KiB

After

Width:  |  Height:  |  Size: 15 KiB

+1 -1
View File
@@ -12,5 +12,5 @@ var_dump(count(exif_read_data(__DIR__."/bug62523_2.jpg")));
Done
--EXPECT--
Test
int(76)
int(72)
Done
Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+1 -1
View File
@@ -7,7 +7,7 @@ output_handler=
zlib.output_compression=0
--FILE--
<?php
$infile = dirname(__FILE__).'/bug73115.JPG';
$infile = dirname(__FILE__).'/bug73115.jpg';
var_dump(count(exif_read_data($infile)));
?>
===DONE===
+14
View File
@@ -0,0 +1,14 @@
--TEST--
Test exif_read_data on unavailable file
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php
$infile = dirname(__FILE__).'/bug73115.JPG';
exif_read_data($infile);
?>
===DONE===
--EXPECTF--
Warning: exif_read_data(): Unable to open file in %sexif_read_data_0.php on line %d
===DONE===
Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 35 KiB

+24 -2
View File
@@ -1,16 +1,38 @@
--TEST--
Bug #67647: Bundled libmagic 5.17 does not detect quicktime files correctly
--SKIPIF--
<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
<?php
require_once(dirname(__FILE__) . '/skipif.inc');
if (ini_get("default_charset") != "UTF-8") {
die("skip require default_charset == UTF-8");
}
?>
--FILE--
<?php
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647私はガラスを食べられます.mov";
$src = dirname(__FILE__) . DIRECTORY_SEPARATOR . "67647.mov";
$f_base = "67647私はガラスを食べられます.mov";
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . $f_base;
/* Streams mb path support is tested a lot elsewhere. Copy the existing file
therefore, avoid duplication in the repo. */
if (!copy($src, $f) || empty(glob($f))) {
die("failed to copy '$src' to '$f'");
}
$fi = new finfo(FILEINFO_MIME_TYPE);
var_dump($fi->file($f));
?>
+++DONE+++
--CLEAN--
<?php
$f_base = "67647私はガラスを食べられます.mov";
$f = dirname(__FILE__) . DIRECTORY_SEPARATOR . $f_base;
unlink($f);
?>
--EXPECT--
string(15) "video/quicktime"
+++DONE+++
+68
View File
@@ -1056,6 +1056,74 @@ bail:
}
/* }}} */
/* {{{ ftp_append
*/
int
ftp_append(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftptype_t type)
{
databuf_t *data = NULL;
zend_long size;
char *ptr;
int ch;
if (ftp == NULL) {
return 0;
}
if (!ftp_type(ftp, type)) {
goto bail;
}
if ((data = ftp_getdata(ftp)) == NULL) {
goto bail;
}
ftp->data = data;
if (!ftp_putcmd(ftp, "APPE", sizeof("APPE")-1, path, path_len)) {
goto bail;
}
if (!ftp_getresp(ftp) || (ftp->resp != 150 && ftp->resp != 125)) {
goto bail;
}
if ((data = data_accept(data, ftp)) == NULL) {
goto bail;
}
size = 0;
ptr = data->buf;
while (!php_stream_eof(instream) && (ch = php_stream_getc(instream))!=EOF) {
/* flush if necessary */
if (FTP_BUFSIZE - size < 2) {
if (my_send(ftp, data->fd, data->buf, size) != size) {
goto bail;
}
ptr = data->buf;
size = 0;
}
if (ch == '\n' && type == FTPTYPE_ASCII) {
*ptr++ = '\r';
size++;
}
*ptr++ = ch;
size++;
}
if (size && my_send(ftp, data->fd, data->buf, size) != size) {
goto bail;
}
ftp->data = data = data_close(ftp, data);
if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250 && ftp->resp != 200)) {
goto bail;
}
return 1;
bail:
ftp->data = data_close(ftp, data);
return 0;
}
/* }}} */
/* {{{ ftp_size
*/
zend_long
+5
View File
@@ -190,6 +190,11 @@ int ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, const size_
*/
int ftp_put(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftptype_t type, zend_long startpos);
/* append the data from a file, socket, or process as a file on the remote server
* returns true on success, false on error
*/
int ftp_append(ftpbuf_t *ftp, const char *path, const size_t path_len, php_stream *instream, ftptype_t type);
/* returns the size of the given file, or -1 on error */
zend_long ftp_size(ftpbuf_t *ftp, const char *path, const size_t path_len);
+43
View File
@@ -191,6 +191,13 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_put, 0, 0, 4)
ZEND_ARG_INFO(0, startpos)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_append, 0, 0, 4)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_INFO(0, remote_file)
ZEND_ARG_INFO(0, local_file)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_ftp_nb_put, 0, 0, 4)
ZEND_ARG_INFO(0, ftp)
ZEND_ARG_INFO(0, remote_file)
@@ -265,6 +272,7 @@ const zend_function_entry php_ftp_functions[] = {
PHP_FE(ftp_get, arginfo_ftp_get)
PHP_FE(ftp_fget, arginfo_ftp_fget)
PHP_FE(ftp_put, arginfo_ftp_put)
PHP_FE(ftp_append, arginfo_ftp_append)
PHP_FE(ftp_fput, arginfo_ftp_fput)
PHP_FE(ftp_size, arginfo_ftp_size)
PHP_FE(ftp_mdtm, arginfo_ftp_mdtm)
@@ -1272,6 +1280,41 @@ PHP_FUNCTION(ftp_put)
}
/* }}} */
/* {{{ proto bool ftp_append(resource stream, string remote_file, string local_file, int mode)
Append content of a file a another file on the FTP server */
PHP_FUNCTION(ftp_append)
{
zval *z_ftp;
ftpbuf_t *ftp;
ftptype_t xtype;
char *remote, *local;
size_t remote_len, local_len;
zend_long mode;
php_stream *instream;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rppl", &z_ftp, &remote, &remote_len, &local, &local_len, &mode) == FAILURE) {
return;
}
if ((ftp = (ftpbuf_t *)zend_fetch_resource(Z_RES_P(z_ftp), le_ftpbuf_name, le_ftpbuf)) == NULL) {
RETURN_FALSE;
}
XTYPE(xtype, mode);
if (!(instream = php_stream_open_wrapper(local, mode == FTPTYPE_ASCII ? "rt" : "rb", REPORT_ERRORS, NULL))) {
RETURN_FALSE;
}
if (!ftp_append(ftp, remote, remote_len, instream, xtype)) {
php_stream_close(instream);
php_error_docref(NULL, E_WARNING, "%s", ftp->inbuf);
RETURN_FALSE;
}
php_stream_close(instream);
RETURN_TRUE;
}
/* }}} */
/* {{{ proto int ftp_nb_put(resource stream, string remote_file, string local_file, int mode[, int startpos])
Stores a file on the FTP server */
+1
View File
@@ -60,6 +60,7 @@ PHP_FUNCTION(ftp_pasv);
PHP_FUNCTION(ftp_get);
PHP_FUNCTION(ftp_fget);
PHP_FUNCTION(ftp_put);
PHP_FUNCTION(ftp_append);
PHP_FUNCTION(ftp_fput);
PHP_FUNCTION(ftp_size);
PHP_FUNCTION(ftp_mdtm);
+32
View File
@@ -0,0 +1,32 @@
--TEST--
ftp_append() create new file and append something
--SKIPIF--
<?php
require 'skipif.inc';
?>
--FILE--
<?php
require 'server.inc';
$ftp = ftp_connect('127.0.0.1', $port);
if (!$ftp) die("Couldn't connect to the server");
var_dump(ftp_login($ftp, 'user', 'pass'));
@unlink(__DIR__.'/ftp_append_foobar');
file_put_contents(__DIR__.'/ftp_append_foo', 'foo');
var_dump(ftp_append($ftp, 'ftp_append_foobar', __DIR__.'/ftp_append_foo', FTP_BINARY));
file_put_contents(__DIR__.'/ftp_append_bar', 'bar');
var_dump(ftp_append($ftp, 'ftp_append_foobar', __DIR__.'/ftp_append_bar', FTP_BINARY));
var_dump(file_get_contents(__DIR__.'/ftp_append_foobar'));
ftp_close($ftp);
?>
--EXPECTF--
bool(true)
bool(true)
bool(true)
string(6) "foobar"
+22 -1
View File
@@ -267,7 +267,28 @@ if ($pid) {
}
}
} elseif (preg_match("~^CWD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
} elseif (preg_match("~^APPE ([\w/.-]+)\r\n$~", $buf, $m)) {
fputs($s, "150 File status okay; about to open data connection\r\n");
if(empty($pasv))
{
if (!$fs = stream_socket_client("tcp://$host:$port")) {
fputs($s, "425 Can't open data connection\r\n");
continue;
}
$data = stream_get_contents($fs);
file_put_contents(__DIR__.'/'.$m[1], $data, FILE_APPEND);
fputs($s, "226 Closing data Connection.\r\n");
fclose($fs);
}else{
$data = stream_get_contents($fs);
file_put_contents(__DIR__.'/'.$m[1], $data, FILE_APPEND);
fputs($s, "226 Closing data Connection.\r\n");
fclose($fs);
}
}elseif (preg_match("~^CWD ([A-Za-z./]+)\r\n$~", $buf, $m)) {
change_dir($m[1]);
fputs($s, "250 CWD command successful.\r\n");
Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

+4
View File
@@ -1,5 +1,9 @@
--TEST--
(Bug #74031) ReflectionFunction for imagepng returns wrong number of parameters
--SKIPIF--
<?php
if (!extension_loaded('gd')) die("skip gd extension not available\n");
?>
--FILE--
<?php
+1 -1
View File
@@ -1,6 +1,6 @@
--TEST--
imagegetclip() - basic functionality
--SKIP--
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip ext/gd required');
?>
+1 -1
View File
@@ -1,6 +1,6 @@
--TEST--
imagesetclip() - basic functionality
--SKIP--
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip ext/gd required');
?>
+1 -1
View File
@@ -1,6 +1,6 @@
--TEST--
imagetypes() - BMP support
--SKIP--
--SKIPIF--
<?php
if (!extension_loaded('gd')) die('skip ext/gd required');
?>
+17
View File
@@ -597,6 +597,22 @@ PHP_FUNCTION(hash_algos)
}
/* }}} */
/* {{{ proto array hash_hmac_algos(void)
Return a list of registered hashing algorithms suitable for hash_hmac() */
PHP_FUNCTION(hash_hmac_algos)
{
zend_string *str;
const php_hash_ops *ops;
array_init(return_value);
ZEND_HASH_FOREACH_STR_KEY_PTR(&php_hash_hashtable, str, ops) {
if (ops->is_crypto) {
add_next_index_str(return_value, zend_string_copy(str));
}
} ZEND_HASH_FOREACH_END();
}
/* }}} */
/* {{{ proto string hash_hkdf(string algo, string ikm [, int length = 0, string info = '', string salt = ''])
RFC5869 HMAC-based key derivation function */
PHP_FUNCTION(hash_hkdf)
@@ -1429,6 +1445,7 @@ const zend_function_entry hash_functions[] = {
PHP_FE(hash_copy, arginfo_hash_copy)
PHP_FE(hash_algos, arginfo_hash_algos)
PHP_FE(hash_hmac_algos, arginfo_hash_algos)
PHP_FE(hash_pbkdf2, arginfo_hash_pbkdf2)
PHP_FE(hash_equals, arginfo_hash_equals)
PHP_FE(hash_hkdf, arginfo_hash_hkdf)
+57
View File
@@ -0,0 +1,57 @@
--TEST--
Test hash_hmac_algos() function : basic functionality
--SKIPIF--
<?php extension_loaded('hash') or die('skip: hash extension not loaded.'); ?>
--FILE--
<?php
print_r(hash_hmac_algos());
--EXPECTF--
Array
(
[%d] => md2
[%d] => md4
[%d] => md5
[%d] => sha1
[%d] => sha224
[%d] => sha256
[%d] => sha384
[%d] => sha512/224
[%d] => sha512/256
[%d] => sha512
[%d] => sha3-224
[%d] => sha3-256
[%d] => sha3-384
[%d] => sha3-512
[%d] => ripemd128
[%d] => ripemd160
[%d] => ripemd256
[%d] => ripemd320
[%d] => whirlpool
[%d] => tiger128,3
[%d] => tiger160,3
[%d] => tiger192,3
[%d] => tiger128,4
[%d] => tiger160,4
[%d] => tiger192,4
[%d] => snefru
[%d] => snefru256
[%d] => gost
[%d] => gost-crypto
[%d] => haval128,3
[%d] => haval160,3
[%d] => haval192,3
[%d] => haval224,3
[%d] => haval256,3
[%d] => haval128,4
[%d] => haval160,4
[%d] => haval192,4
[%d] => haval224,4
[%d] => haval256,4
[%d] => haval128,5
[%d] => haval160,5
[%d] => haval192,5
[%d] => haval224,5
[%d] => haval256,5
)
+25 -25
View File
@@ -173,6 +173,24 @@ ZEND_BEGIN_ARG_INFO_EX(numfmt_parse_currency_arginfo, 0, 0, 3)
ZEND_ARG_INFO(1, position)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX( locale_get_loc_in_loc_args, 0, ZEND_RETURN_VALUE, 1 )
ZEND_ARG_INFO(0, locale)
ZEND_ARG_INFO(0, in_locale)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX( locale_filter_matches_args, 0, ZEND_RETURN_VALUE, 2 )
ZEND_ARG_INFO(0, langtag)
ZEND_ARG_INFO(0, locale)
ZEND_ARG_INFO(0, canonicalize)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX( locale_lookup_args, 0, ZEND_RETURN_VALUE, 2 )
ZEND_ARG_INFO(0, langtag)
ZEND_ARG_INFO(0, locale)
ZEND_ARG_INFO(0, canonicalize)
ZEND_ARG_INFO(0, def)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(locale_0_args, 0, 0, 0)
ZEND_END_ARG_INFO()
@@ -180,24 +198,6 @@ ZEND_BEGIN_ARG_INFO_EX(locale_1_arg, 0, 0, 1)
ZEND_ARG_INFO(0, arg1)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(locale_2_args, 0, 0, 2)
ZEND_ARG_INFO(0, arg1)
ZEND_ARG_INFO(0, arg2)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(locale_3_args, 0, 0, 3)
ZEND_ARG_INFO(0, arg1)
ZEND_ARG_INFO(0, arg2)
ZEND_ARG_INFO(0, arg3)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(locale_4_args, 0, 0, 4)
ZEND_ARG_INFO(0, arg1)
ZEND_ARG_INFO(0, arg2)
ZEND_ARG_INFO(0, arg3)
ZEND_ARG_INFO(0, arg4)
ZEND_END_ARG_INFO()
#define intl_0_args collator_static_0_args
#define intl_1_arg collator_static_1_arg
@@ -670,17 +670,17 @@ zend_function_entry intl_functions[] = {
PHP_FE( locale_get_script, locale_1_arg )
PHP_FE( locale_get_region, locale_1_arg )
PHP_FE( locale_get_keywords, locale_1_arg )
PHP_FE( locale_get_display_script, locale_2_args )
PHP_FE( locale_get_display_region, locale_2_args )
PHP_FE( locale_get_display_name, locale_2_args )
PHP_FE( locale_get_display_language, locale_2_args)
PHP_FE( locale_get_display_variant, locale_2_args )
PHP_FE( locale_get_display_script, locale_get_loc_in_loc_args )
PHP_FE( locale_get_display_region, locale_get_loc_in_loc_args )
PHP_FE( locale_get_display_name, locale_get_loc_in_loc_args )
PHP_FE( locale_get_display_language, locale_get_loc_in_loc_args)
PHP_FE( locale_get_display_variant, locale_get_loc_in_loc_args )
PHP_FE( locale_compose, locale_1_arg )
PHP_FE( locale_parse, locale_1_arg )
PHP_FE( locale_get_all_variants, locale_1_arg )
PHP_FE( locale_filter_matches, locale_3_args )
PHP_FE( locale_filter_matches, locale_filter_matches_args )
PHP_FE( locale_canonicalize, locale_1_arg )
PHP_FE( locale_lookup, locale_4_args )
PHP_FE( locale_lookup, locale_lookup_args )
PHP_FE( locale_accept_from_http, locale_1_arg )
/* MessageFormatter functions */
+73
View File
@@ -0,0 +1,73 @@
--TEST--
Bug #74993 Wrong reflection on some locale_* functions
--SKIPIF--
<?php
extension_loaded('intl') || print 'skip';
--FILE--
<?php
$funcs = [
'locale_get_display_language',
'locale_get_display_name',
'locale_get_display_region',
'locale_get_display_script',
'locale_get_display_variant',
'locale_filter_matches',
'locale_lookup',
];
foreach ($funcs as $func) {
echo (new ReflectionFunction($func));
}
--EXPECT--
Function [ <internal:intl> function locale_get_display_language ] {
- Parameters [2] {
Parameter #0 [ <required> $locale ]
Parameter #1 [ <optional> $in_locale ]
}
}
Function [ <internal:intl> function locale_get_display_name ] {
- Parameters [2] {
Parameter #0 [ <required> $locale ]
Parameter #1 [ <optional> $in_locale ]
}
}
Function [ <internal:intl> function locale_get_display_region ] {
- Parameters [2] {
Parameter #0 [ <required> $locale ]
Parameter #1 [ <optional> $in_locale ]
}
}
Function [ <internal:intl> function locale_get_display_script ] {
- Parameters [2] {
Parameter #0 [ <required> $locale ]
Parameter #1 [ <optional> $in_locale ]
}
}
Function [ <internal:intl> function locale_get_display_variant ] {
- Parameters [2] {
Parameter #0 [ <required> $locale ]
Parameter #1 [ <optional> $in_locale ]
}
}
Function [ <internal:intl> function locale_filter_matches ] {
- Parameters [3] {
Parameter #0 [ <required> $langtag ]
Parameter #1 [ <required> $locale ]
Parameter #2 [ <optional> $canonicalize ]
}
}
Function [ <internal:intl> function locale_lookup ] {
- Parameters [4] {
Parameter #0 [ <required> $langtag ]
Parameter #1 [ <required> $locale ]
Parameter #2 [ <optional> $canonicalize ]
Parameter #3 [ <optional> $def ]
}
}
@@ -21,7 +21,8 @@ echo $orstr,"\n";
echo $new_str,"\n";
echo $recovstr,"\n";
var_dump(($orstr == $recovstr) == $recovstr2);
var_dump($orstr === $recovstr);
var_dump($orstr === $recovstr2);
echo "Done.\n";
--EXPECT--
@@ -29,4 +30,5 @@ echo "Done.\n";
ōshanbyū
オーシャンビュー
bool(true)
bool(true)
Done.
+1 -1
View File
@@ -19,6 +19,6 @@ if (PHP_JSON != "no") {
ADD_MAKEFILE_FRAGMENT();
PHP_INSTALL_HEADERS("ext/json/", "php_json.h");
PHP_INSTALL_HEADERS("ext/json/", "php_json.h php_json_parser.h php_json_scanner.h");
}
+11 -2
View File
@@ -292,6 +292,8 @@ yy14:
{
s->str_start = s->cursor;
s->str_esc = 0;
s->utf8_invalid = 0;
s->utf8_invalid_count = 0;
PHP_JSON_CONDITION_SET_AND_GOTO(STR_P1);
}
yy16:
@@ -638,9 +640,16 @@ yy79:
yy80:
{
if (s->options & (PHP_JSON_INVALID_UTF8_IGNORE | PHP_JSON_INVALID_UTF8_SUBSTITUTE)) {
int utf8_addition = (s->options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) ? 3 : 0;
if (s->options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) {
if (s->utf8_invalid_count > INT_MAX - 2) {
s->errcode = PHP_JSON_ERROR_UTF8;
return PHP_JSON_T_ERROR;
}
s->utf8_invalid_count += 2;
} else {
s->utf8_invalid_count--;
}
s->utf8_invalid = 1;
s->utf8_invalid_count += utf8_addition - 1;
PHP_JSON_CONDITION_GOTO(STR_P1);
}
s->errcode = PHP_JSON_ERROR_UTF8;
+11 -2
View File
@@ -209,6 +209,8 @@ std:
<JS>["] {
s->str_start = s->cursor;
s->str_esc = 0;
s->utf8_invalid = 0;
s->utf8_invalid_count = 0;
PHP_JSON_CONDITION_SET_AND_GOTO(STR_P1);
}
<JS>CTRL {
@@ -280,9 +282,16 @@ std:
<STR_P1>UTF8 { PHP_JSON_CONDITION_GOTO(STR_P1); }
<STR_P1>ANY {
if (s->options & (PHP_JSON_INVALID_UTF8_IGNORE | PHP_JSON_INVALID_UTF8_SUBSTITUTE)) {
int utf8_addition = (s->options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) ? 3 : 0;
if (s->options & PHP_JSON_INVALID_UTF8_SUBSTITUTE) {
if (s->utf8_invalid_count > INT_MAX - 2) {
s->errcode = PHP_JSON_ERROR_UTF8;
return PHP_JSON_T_ERROR;
}
s->utf8_invalid_count += 2;
} else {
s->utf8_invalid_count--;
}
s->utf8_invalid = 1;
s->utf8_invalid_count += utf8_addition - 1;
PHP_JSON_CONDITION_GOTO(STR_P1);
}
s->errcode = PHP_JSON_ERROR_UTF8;
+20 -1
View File
@@ -9,11 +9,17 @@ if (!extension_loaded("json")) print "skip";
function json_decode_invalid_utf8($str) {
var_dump(json_decode($str));
var_dump(json_decode($str, true, 512, JSON_INVALID_UTF8_IGNORE));
var_dump(bin2hex(json_decode($str, true, 512, JSON_INVALID_UTF8_SUBSTITUTE)));
$json = json_decode($str, true, 512, JSON_INVALID_UTF8_SUBSTITUTE);
if (is_array($json)) {
var_dump(array_map(function($item) { return bin2hex($item); }, $json));
} else {
var_dump(bin2hex($json));
}
}
json_decode_invalid_utf8("\"a\xb0b\"");
json_decode_invalid_utf8("\"a\xd0\xf2b\"");
json_decode_invalid_utf8("\"\x61\xf0\x80\x80\x41\"");
json_decode_invalid_utf8("[\"\xc1\xc1\",\"a\"]");
echo "Done\n";
?>
--EXPECT--
@@ -26,4 +32,17 @@ string(16) "61efbfbdefbfbd62"
NULL
string(2) "aA"
string(22) "61efbfbdefbfbdefbfbd41"
NULL
array(2) {
[0]=>
string(0) ""
[1]=>
string(1) "a"
}
array(2) {
[0]=>
string(12) "efbfbdefbfbd"
[1]=>
string(2) "61"
}
Done
+12 -7
View File
@@ -3322,10 +3322,11 @@ PHP_FUNCTION(ldap_control_paged_result_response)
/* {{{ Extended operations, Pierangelo Masarati */
#ifdef HAVE_LDAP_EXTENDED_OPERATION_S
/* {{{ proto ? ldap_exop(resource link, string reqoid [, string reqdata [, string retdata [, string retoid]]])
/* {{{ proto resource ldap_exop(resource link, string reqoid [, string reqdata [, array servercontrols [, array clientcontrols [, string &retdata [, string &retoid]]]]])
Extended operation */
PHP_FUNCTION(ldap_exop)
{
zval *servercontrols, *clientcontrols;
zval *link, *reqoid, *reqdata, *retdata, *retoid;
char *lreqoid, *lretoid = NULL;
struct berval lreqdata, *lretdata = NULL;
@@ -3334,7 +3335,7 @@ PHP_FUNCTION(ldap_exop)
int rc, msgid, myargcount = ZEND_NUM_ARGS();
/* int reqoid_len, reqdata_len, retdata_len, retoid_len, retdat_len; */
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz|zz/z/", &link, &reqoid, &reqdata, &retdata, &retoid) != SUCCESS) {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rz|zzzz/z/", &link, &reqoid, &reqdata, &servercontrols, &clientcontrols, &retdata, &retoid) != SUCCESS) {
WRONG_PARAM_COUNT;
}
@@ -3343,6 +3344,8 @@ PHP_FUNCTION(ldap_exop)
}
switch (myargcount) {
case 7:
case 6:
case 5:
case 4:
case 3:
@@ -3355,13 +3358,13 @@ PHP_FUNCTION(ldap_exop)
lreqoid = Z_STRVAL_P(reqoid);
}
if (myargcount > 3) {
if (myargcount > 5) {
/* synchronous call */
rc = ldap_extended_operation_s(ld->link, lreqoid,
lreqdata.bv_len > 0 ? &lreqdata: NULL,
NULL,
NULL,
myargcount > 4 ? &lretoid : NULL,
myargcount > 6 ? &lretoid : NULL,
&lretdata );
if (rc != LDAP_SUCCESS ) {
php_error_docref(NULL, E_WARNING, "Extended operation %s failed: %s (%d)", lreqoid, ldap_err2string(rc), rc);
@@ -3370,7 +3373,7 @@ PHP_FUNCTION(ldap_exop)
/* Reverse -> fall through */
switch (myargcount) {
case 5:
case 7:
zval_dtor(retoid);
if (lretoid == NULL) {
ZVAL_EMPTY_STRING(retoid);
@@ -3378,7 +3381,7 @@ PHP_FUNCTION(ldap_exop)
ZVAL_STRING(retoid, lretoid);
ldap_memfree(lretoid);
}
case 4:
case 6:
/* use arg #4 as the data returned by the server */
zval_dtor(retdata);
if (lretdata == NULL) {
@@ -3794,10 +3797,12 @@ ZEND_END_ARG_INFO()
#endif
#ifdef HAVE_LDAP_EXTENDED_OPERATION_S
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop, 0, 0, 5)
ZEND_BEGIN_ARG_INFO_EX(arginfo_ldap_exop, 0, 0, 2)
ZEND_ARG_INFO(0, link)
ZEND_ARG_INFO(0, reqoid)
ZEND_ARG_INFO(0, reqdata)
ZEND_ARG_INFO(0, servercontrols)
ZEND_ARG_INFO(0, clientcontrols)
ZEND_ARG_INFO(1, retdata)
ZEND_ARG_INFO(1, retoid)
ZEND_END_ARG_INFO()
+3 -3
View File
@@ -36,10 +36,10 @@ function extract_genpw($retdata)
$userAPassword = "oops";
// ldap_exop(resource link, string reqoid [, string reqdata [, string retoid [, string retdata]]])
// bool ldap_parse_exop(resource link, resource result [, string retoid [, string retdata]])
// ldap_exop(resource link, string reqoid [, string reqdata [, array servercontrols [, array clientcontrols [, string &retdata [, string &retoid]]]]])
// bool ldap_parse_exop(resource link, resource result [, string &retdata [, string &retoid]])
var_dump(
ldap_exop($link, LDAP_EXOP_WHO_AM_I, NULL, $retdata, $retoid),
ldap_exop($link, LDAP_EXOP_WHO_AM_I, NULL, NULL, NULL, $retdata, $retoid),
$retdata,
$retoid,
$r = ldap_exop($link, LDAP_EXOP_WHO_AM_I),
@@ -88,7 +88,8 @@ const struct mbfl_convert_vtbl vtbl_html_wchar = {
mbfl_filt_conv_html_dec_ctor,
mbfl_filt_conv_html_dec_dtor,
mbfl_filt_conv_html_dec,
mbfl_filt_conv_html_dec_flush };
mbfl_filt_conv_html_dec_flush,
mbfl_filt_conv_html_dec_copy };
#define CK(statement) do { if ((statement) < 0) return (-1); } while (0)
@@ -309,4 +310,9 @@ int mbfl_filt_conv_html_dec_flush(mbfl_convert_filter *filter)
return err;
}
void mbfl_filt_conv_html_dec_copy(mbfl_convert_filter *src, mbfl_convert_filter *dest)
{
*dest = *src;
dest->opaque = mbfl_malloc(html_enc_buffer_size+1);
memcpy(dest->opaque, src->opaque, html_enc_buffer_size+1);
}
@@ -42,6 +42,7 @@ int mbfl_filt_conv_html_enc(int c, mbfl_convert_filter *filter);
int mbfl_filt_conv_html_enc_flush(mbfl_convert_filter *filter);
int mbfl_filt_conv_html_dec(int c, mbfl_convert_filter *filter);
int mbfl_filt_conv_html_dec_flush(mbfl_convert_filter *filter);
void mbfl_filt_conv_html_dec_copy(mbfl_convert_filter *src, mbfl_convert_filter *dest);
void mbfl_filt_conv_html_dec_ctor(mbfl_convert_filter *filter);
void mbfl_filt_conv_html_dec_dtor(mbfl_convert_filter *filter);
@@ -222,11 +222,11 @@ mbfl_filt_tl_jisx0201_jisx0208(int c, mbfl_convert_filter *filt)
} else if (mode & (MBFL_FILT_TL_ZEN2HAN_HIRA2KANA
| MBFL_FILT_TL_ZEN2HAN_KANA2HIRA)) {
if ((mode & MBFL_FILT_TL_ZEN2HAN_HIRA2KANA) &&
c >= 0x3041 && c <= 0x3093) {
((c >= 0x3041 && c <= 0x3093) || c == 0x309d || c == 0x309e)) {
/* Zenkaku hirangana to Zenkaku katakana */
s = c + 0x60;
} else if ((mode & MBFL_FILT_TL_ZEN2HAN_KANA2HIRA) &&
c >= 0x30a1 && c <= 0x30f3) {
((c >= 0x30a1 && c <= 0x30f3) || c == 0x30fd || c == 0x30fe)) {
/* Zenkaku katakana to Zenkaku hirangana */
s = c - 0x60;
}
+18 -4
View File
@@ -467,14 +467,26 @@ int mbfl_convert_filter_strcat(mbfl_convert_filter *filter, const unsigned char
int
mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter)
{
int mode_backup, ret, n, m, r;
int mode_backup, substchar_backup, ret, n, m, r;
ret = 0;
mode_backup = filter->illegal_mode;
filter->illegal_mode = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE;
substchar_backup = filter->illegal_substchar;
/* The used substitution character may not be supported by the target character encoding.
* If that happens, first try to use "?" instead and if that also fails, silently drop the
* character. */
if (filter->illegal_mode == MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR
&& filter->illegal_substchar != 0x3f) {
filter->illegal_substchar = 0x3f;
} else {
filter->illegal_mode = MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE;
}
switch (mode_backup) {
case MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR:
ret = (*filter->filter_function)(filter->illegal_substchar, filter);
ret = (*filter->filter_function)(substchar_backup, filter);
break;
case MBFL_OUTPUTFILTER_ILLEGAL_MODE_LONG:
if (c >= 0) {
@@ -560,14 +572,16 @@ mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter)
}
ret = mbfl_convert_filter_strcat(filter, (const unsigned char *)";");
} else {
ret = (*filter->filter_function)(filter->illegal_substchar, filter);
ret = (*filter->filter_function)(substchar_backup, filter);
}
}
break;
default:
break;
}
filter->illegal_mode = mode_backup;
filter->illegal_substchar = substchar_backup;
filter->num_illegalchar++;
return ret;
+69 -210
View File
@@ -106,8 +106,6 @@ static void php_mb_gpc_set_input_encoding(const zend_encoding *encoding);
static inline zend_bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding no_enc);
static inline zend_bool php_mb_is_no_encoding_unicode(enum mbfl_no_encoding no_enc);
static inline zend_bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc);
/* }}} */
@@ -477,6 +475,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_eregi_replace, 0, 0, 3)
ZEND_ARG_INFO(0, pattern)
ZEND_ARG_INFO(0, replacement)
ZEND_ARG_INFO(0, string)
ZEND_ARG_INFO(0, option)
ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_INFO_EX(arginfo_mb_ereg_replace_callback, 0, 0, 3)
@@ -936,6 +935,7 @@ static size_t php_mb_zend_encoding_converter(unsigned char **to, size_t *to_leng
if (convd == NULL) {
return -1;
}
mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode));
mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar));
@@ -1977,69 +1977,21 @@ PHP_FUNCTION(mb_detect_order)
static inline int php_mb_check_code_point(long cp)
{
enum mbfl_no_encoding no_enc;
char* buf;
char buf_len;
no_enc = MBSTRG(current_internal_encoding)->no_encoding;
if (php_mb_is_no_encoding_utf8(no_enc)) {
if ((cp > 0 && 0xd800 > cp) || (cp > 0xdfff && 0x110000 > cp)) {
return 1;
}
if (cp <= 0 || cp >= 0x110000) {
/* Out of Unicode range */
return 0;
} else if (php_mb_is_no_encoding_unicode(no_enc)) {
if (0 > cp || cp > 0x10ffff) {
return 0;
}
return 1;
// backward compatibility
} else if (php_mb_is_unsupported_no_encoding(no_enc)) {
return cp < 0xffff && cp > 0x0;
}
if (cp < 0x100) {
buf_len = 1;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = cp;
buf[1] = 0;
} else if (cp < 0x10000) {
buf_len = 2;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = cp >> 8;
buf[1] = cp & 0xff;
buf[2] = 0;
} else if (cp < 0x1000000) {
buf_len = 3;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = cp >> 16;
buf[1] = (cp >> 8) & 0xff;
buf[2] = cp & 0xff;
buf[3] = 0;
} else {
buf_len = 4;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = cp >> 24;
buf[1] = (cp >> 16) & 0xff;
buf[2] = (cp >> 8) & 0xff;
buf[3] = cp & 0xff;
buf[4] = 0;
if (cp >= 0xd800 && cp <= 0xdfff) {
/* Surrogate code-point. These are never valid on their own and we only allow a single
* substitute character. */
return 0;
}
if (php_mb_check_encoding(buf, buf_len, NULL)) {
efree(buf);
return 1;
}
efree(buf);
return 0;
/* As the we do not know the target encoding of the conversion operation that is going to
* use the substitution character, we cannot check whether the codepoint is actually mapped
* in the given encoding at this point. Thus we have to accept everything. */
return 1;
}
/* {{{ proto mixed mb_substitute_character([mixed substchar])
@@ -2080,7 +2032,7 @@ PHP_FUNCTION(mb_substitute_character)
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
MBSTRG(current_filter_illegal_substchar) = Z_LVAL_P(arg1);
} else {
php_error_docref(NULL, E_WARNING, "Unknown character.");
php_error_docref(NULL, E_WARNING, "Unknown character");
RETURN_FALSE;
}
}
@@ -2091,7 +2043,7 @@ PHP_FUNCTION(mb_substitute_character)
MBSTRG(current_filter_illegal_mode) = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR;
MBSTRG(current_filter_illegal_substchar) = Z_LVAL_P(arg1);
} else {
php_error_docref(NULL, E_WARNING, "Unknown character.");
php_error_docref(NULL, E_WARNING, "Unknown character");
RETURN_FALSE;
}
break;
@@ -3218,13 +3170,6 @@ static inline zend_bool php_mb_is_unsupported_no_encoding(enum mbfl_no_encoding
}
/* See mbfl_no_encoding definition for list of unicode encodings */
static inline zend_bool php_mb_is_no_encoding_unicode(enum mbfl_no_encoding no_enc)
{
return (no_enc >= mbfl_no_encoding_ucs4 && no_enc <= mbfl_no_encoding_utf8_sb);
}
/* See mbfl_no_encoding definition for list of UTF-8 encodings */
static inline zend_bool php_mb_is_no_encoding_utf8(enum mbfl_no_encoding no_enc)
{
@@ -3301,29 +3246,9 @@ MBSTRING_API char *php_mb_convert_encoding(const char *input, size_t length, con
php_error_docref(NULL, E_WARNING, "Unable to create character encoding converter");
return NULL;
}
mbfl_buffer_converter_illegal_mode(convd, MBSTRG(current_filter_illegal_mode));
if (string.no_encoding == MBSTRG(current_internal_encoding)->no_encoding) {
mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar));
} else if (php_mb_is_no_encoding_unicode(string.no_encoding) && php_mb_is_no_encoding_unicode(MBSTRG(current_internal_encoding)->no_encoding)) {
if (php_mb_is_no_encoding_utf8(string.no_encoding)) {
if (MBSTRG(current_filter_illegal_substchar) > 0xd7ff &&
0xe000 > MBSTRG(current_filter_illegal_substchar)
) {
mbfl_buffer_converter_illegal_substchar(convd, 0x3f);
} else {
mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar));
}
} else {
mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar));
}
} else {
mbfl_buffer_converter_illegal_substchar(convd, 0x3f);
}
mbfl_buffer_converter_illegal_substchar(convd, MBSTRG(current_filter_illegal_substchar));
/* do it */
ret = mbfl_buffer_converter_feed_result(convd, &string, &result);
@@ -4685,10 +4610,10 @@ PHP_FUNCTION(mb_send_mail)
p = ZSTR_VAL(str_headers);
n = ZSTR_LEN(str_headers);
mbfl_memory_device_strncat(&device, p, n);
zend_string_release(str_headers);
if (n > 0 && p[n - 1] != '\n') {
mbfl_memory_device_strncat(&device, "\n", 1);
}
zend_string_release(str_headers);
}
if (!zend_hash_str_exists(&ht_headers, "MIME-VERSION", sizeof("MIME-VERSION") - 1)) {
@@ -5131,8 +5056,6 @@ static inline zend_long php_mb_ord(const char* str, size_t str_len, const char*
enum mbfl_no_encoding no_enc;
char* ret;
size_t ret_len;
const mbfl_encoding *encoding;
unsigned char char_len;
zend_long cp;
if (enc == NULL) {
@@ -5146,52 +5069,39 @@ static inline zend_long php_mb_ord(const char* str, size_t str_len, const char*
}
}
if (php_mb_is_no_encoding_unicode(no_enc)) {
ret = php_mb_convert_encoding(str, str_len, "UCS-4BE", enc, &ret_len);
if (ret == NULL) {
return -1;
}
cp = (unsigned char) ret[0] << 24 | \
(unsigned char) ret[1] << 16 | \
(unsigned char) ret[2] << 8 | \
(unsigned char) ret[3];
efree(ret);
return cp;
} else if (php_mb_is_unsupported_no_encoding(no_enc)) {
if (php_mb_is_unsupported_no_encoding(no_enc)) {
php_error_docref(NULL, E_WARNING, "Unsupported encoding \"%s\"", enc);
return -1;
}
ret = php_mb_convert_encoding(str, str_len, enc, enc, &ret_len);
if (str_len == 0) {
php_error_docref(NULL, E_WARNING, "Empty string");
return -1;
}
{
long orig_illegalchars = MBSTRG(illegalchars);
MBSTRG(illegalchars) = 0;
ret = php_mb_convert_encoding(str, str_len, "UCS-4BE", enc, &ret_len);
if (MBSTRG(illegalchars) != 0) {
if (ret) {
efree(ret);
}
MBSTRG(illegalchars) = orig_illegalchars;
return -1;
}
MBSTRG(illegalchars) = orig_illegalchars;
}
if (ret == NULL) {
return -1;
}
encoding = mbfl_no2encoding(no_enc);
char_len = php_mb_mbchar_bytes_ex(ret, encoding);
if (char_len == 1) {
cp = (unsigned char) ret[0];
} else if (char_len == 2) {
cp = ((unsigned char) ret[0] << 8) | \
(unsigned char) ret[1];
} else if (char_len == 3) {
cp = ((unsigned char) ret[0] << 16) | \
((unsigned char) ret[1] << 8) | \
(unsigned char) ret[2];
} else {
cp = ((unsigned char) ret[0] << 24) | \
((unsigned char) ret[1] << 16) | \
((unsigned char) ret[2] << 8) | \
(unsigned char) ret[3];
}
cp = (unsigned char) ret[0] << 24 | \
(unsigned char) ret[1] << 16 | \
(unsigned char) ret[2] << 8 | \
(unsigned char) ret[3];
efree(ret);
@@ -5243,20 +5153,18 @@ static inline char* php_mb_chr(zend_long cp, const char* enc, size_t *output_len
}
}
if (php_mb_is_no_encoding_utf8(no_enc)) {
if (php_mb_is_unsupported_no_encoding(no_enc)) {
php_error_docref(NULL, E_WARNING, "Unsupported encoding \"%s\"", enc);
return NULL;
}
if (0 > cp || cp > 0x10ffff || (cp > 0xd7ff && 0xe000 > cp)) {
if (php_mb_is_no_encoding_utf8(MBSTRG(current_internal_encoding)->no_encoding)) {
cp = MBSTRG(current_filter_illegal_substchar);
} else if (php_mb_is_no_encoding_unicode(MBSTRG(current_internal_encoding)->no_encoding)) {
if (0xd800 > MBSTRG(current_filter_illegal_substchar) || MBSTRG(current_filter_illegal_substchar) > 0xdfff) {
cp = MBSTRG(current_filter_illegal_substchar);
} else {
cp = 0x3f;
}
} else {
cp = 0x3f;
}
if (cp < 0 || cp > 0x10ffff) {
return NULL;
}
if (php_mb_is_no_encoding_utf8(no_enc)) {
if (cp > 0xd7ff && 0xe000 > cp) {
return NULL;
}
if (cp < 0x80) {
@@ -5292,80 +5200,31 @@ static inline char* php_mb_chr(zend_long cp, const char* enc, size_t *output_len
}
return ret;
}
} else if (php_mb_is_no_encoding_unicode(no_enc)) {
if (0 > cp || 0x10ffff < cp) {
if (php_mb_is_no_encoding_unicode(MBSTRG(current_internal_encoding)->no_encoding)) {
cp = MBSTRG(current_filter_illegal_substchar);
} else {
cp = 0x3f;
}
}
buf_len = 4;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = (cp >> 24) & 0xff;
buf[1] = (cp >> 16) & 0xff;
buf[2] = (cp >> 8) & 0xff;
buf[3] = cp & 0xff;
buf[4] = 0;
buf_len = 4;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = (cp >> 24) & 0xff;
buf[1] = (cp >> 16) & 0xff;
buf[2] = (cp >> 8) & 0xff;
buf[3] = cp & 0xff;
buf[4] = 0;
{
long orig_illegalchars = MBSTRG(illegalchars);
MBSTRG(illegalchars) = 0;
ret = php_mb_convert_encoding(buf, buf_len, enc, "UCS-4BE", &ret_len);
efree(buf);
if (output_len) {
*output_len = ret_len;
if (MBSTRG(illegalchars) != 0) {
efree(buf);
efree(ret);
MBSTRG(illegalchars) = orig_illegalchars;
return NULL;
}
return ret;
} else if (php_mb_is_unsupported_no_encoding(no_enc)) {
php_error_docref(NULL, E_WARNING, "Unsupported encoding \"%s\"", enc);
return NULL;
MBSTRG(illegalchars) = orig_illegalchars;
}
if (0 > cp || cp > 0x100000000) {
if (no_enc == MBSTRG(current_internal_encoding)->no_encoding) {
cp = MBSTRG(current_filter_illegal_substchar);
} else {
cp = 0x3f;
}
}
if (cp < 0x100) {
buf_len = 1;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = cp;
buf[1] = 0;
} else if (cp < 0x10000) {
buf_len = 2;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = cp >> 8;
buf[1] = cp & 0xff;
buf[2] = 0;
} else if (cp < 0x1000000) {
buf_len = 3;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = cp >> 16;
buf[1] = (cp >> 8) & 0xff;
buf[2] = cp & 0xff;
buf[3] = 0;
} else {
buf_len = 4;
buf = (char *) safe_emalloc(buf_len, 1, 1);
buf[0] = cp >> 24;
buf[1] = (cp >> 16) & 0xff;
buf[2] = (cp >> 8) & 0xff;
buf[3] = cp & 0xff;
buf[4] = 0;
}
ret = php_mb_convert_encoding(buf, buf_len, enc, enc, &ret_len);
efree(buf);
if (output_len) {
*output_len = ret_len;
}
+15 -14
View File
@@ -122,6 +122,7 @@ MBSTRING_API int php_unicode_is_prop(unsigned long code, unsigned long mask1,
static unsigned long case_lookup(unsigned long code, long l, long r, int field)
{
long m;
const unsigned int *tmp;
/*
* Do the binary search.
@@ -132,13 +133,13 @@ static unsigned long case_lookup(unsigned long code, long l, long r, int field)
* the beginning of a case mapping triple.
*/
m = (l + r) >> 1;
m -= (m % 3);
if (code > _uccase_map[m])
l = m + 3;
else if (code < _uccase_map[m])
r = m - 3;
else if (code == _uccase_map[m])
return _uccase_map[m + field];
tmp = &_uccase_map[m*3];
if (code > *tmp)
l = m + 1;
else if (code < *tmp)
r = m - 1;
else if (code == *tmp)
return tmp[field];
}
return code;
@@ -172,9 +173,9 @@ MBSTRING_API unsigned long php_unicode_toupper(unsigned long code, enum mbfl_no_
/*
* The character is lower case.
*/
field = 2;
field = 1;
l = _uccase_len[0];
r = (l + _uccase_len[1]) - 3;
r = (l + _uccase_len[1]) - 1;
if (enc == mbfl_no_encoding_8859_9) {
return php_turkish_toupper(code, l, r, field);
@@ -186,7 +187,7 @@ MBSTRING_API unsigned long php_unicode_toupper(unsigned long code, enum mbfl_no_
*/
field = 1;
l = _uccase_len[0] + _uccase_len[1];
r = _uccase_size - 3;
r = _uccase_size - 1;
}
return case_lookup(code, l, r, field);
}
@@ -205,7 +206,7 @@ MBSTRING_API unsigned long php_unicode_tolower(unsigned long code, enum mbfl_no_
*/
field = 1;
l = 0;
r = _uccase_len[0] - 3;
r = _uccase_len[0] - 1;
if (enc == mbfl_no_encoding_8859_9) {
return php_turkish_tolower(code, l, r, field);
@@ -217,7 +218,7 @@ MBSTRING_API unsigned long php_unicode_tolower(unsigned long code, enum mbfl_no_
*/
field = 2;
l = _uccase_len[0] + _uccase_len[1];
r = _uccase_size - 3;
r = _uccase_size - 1;
}
return case_lookup(code, l, r, field);
}
@@ -240,13 +241,13 @@ MBSTRING_API unsigned long php_unicode_totitle(unsigned long code, enum mbfl_no_
* The character is upper case.
*/
l = 0;
r = _uccase_len[0] - 3;
r = _uccase_len[0] - 1;
} else {
/*
* The character is lower case.
*/
l = _uccase_len[0];
r = (l + _uccase_len[1]) - 3;
r = (l + _uccase_len[1]) - 1;
}
return case_lookup(code, l, r, field);
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Bug #62934: mb_convert_kana() does not convert iteration marks
--FILE--
<?php
echo mb_convert_kana('あゝすゞめアヽスヾメ', 'C', 'UTF-8') . "\n";
echo mb_convert_kana('あゝすゞめアヽスヾメ', 'c', 'UTF-8') . "\n";
?>
--EXPECT--
アヽスヾメアヽスヾメ
あゝすゞめあゝすゞめ
+25 -4
View File
@@ -4,11 +4,32 @@ Bug #69079 (enhancement for mb_substitute_character)
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--FILE--
<?php
mb_internal_encoding('UTF-8');
var_dump(mb_substitute_character(0x1f600));
var_dump(mb_substitute_character(0x1F600));
var_dump(bin2hex(mb_scrub("\xff")));
mb_substitute_character(0x3f); // Reset to '?', as the next call will fail
var_dump(mb_substitute_character(0xD800)); // Surrogate (illegal)
var_dump(bin2hex(mb_scrub("\xff")));
mb_internal_encoding('EUC-JP-2004');
var_dump(mb_substitute_character(0x8fa1ef));
mb_substitute_character(0x63); // Reset to '?', as the next call will fail
mb_substitute_character(0x8fa1ef); // EUC-JP-2004 encoding of U+50AA (illegal)
var_dump(bin2hex(mb_scrub("\x8d")));
mb_substitute_character(0x50aa);
var_dump(bin2hex(mb_scrub("\x8d")));
?>
--EXPECT--
--EXPECTF--
bool(true)
bool(true)
string(8) "f09f9880"
Warning: mb_substitute_character(): Unknown character in %s on line %d
bool(false)
string(2) "3f"
Warning: mb_substitute_character(): Unknown character in %s on line %d
string(2) "63"
string(6) "8fa1ef"
+6 -3
View File
@@ -8,10 +8,13 @@ mb_substitute_character(0xfffd);
var_dump("?" === mb_convert_encoding("\x80", "Shift_JIS", "EUC-JP"));
mb_internal_encoding("UCS-4BE");
var_dump("\x00\x00\xff\xfd" === mb_convert_encoding("\x80", "UCS-4BE", "UTF-8"));
mb_substitute_character(0xd800);
var_dump("\x00\x00\x00\x3f" === mb_convert_encoding("\x80", "UCS-4BE", "UTF-8"));
mb_internal_encoding("UTF-8");
mb_substitute_character(0xfffd);
var_dump("\u{fffd}" === mb_convert_encoding("\x80", "UTF-8", "EUC-JP-2004"));
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)
+44
View File
@@ -0,0 +1,44 @@
--TEST--
Bug #69267: mb_strtolower fails on titlecase characters
--FILE--
<?php
$str_l = "džljnjdz";
$str_u = "DŽLJNJDZ";
$str_t = "DžLjNjDz";
var_dump(mb_strtolower($str_l));
var_dump(mb_strtolower($str_u));
var_dump(mb_strtolower($str_t));
var_dump(mb_strtoupper($str_l));
var_dump(mb_strtoupper($str_u));
var_dump(mb_strtoupper($str_t));
var_dump(mb_convert_case($str_l, MB_CASE_TITLE));
var_dump(mb_convert_case($str_u, MB_CASE_TITLE));
var_dump(mb_convert_case($str_t, MB_CASE_TITLE));
$str_l = "ᾳ";
$str_t = "ᾼ";
var_dump(mb_strtolower($str_l));
var_dump(mb_strtolower($str_t));
var_dump(mb_strtoupper($str_l));
var_dump(mb_strtoupper($str_t));
var_dump(mb_convert_case($str_l, MB_CASE_TITLE));
var_dump(mb_convert_case($str_t, MB_CASE_TITLE));
?>
--EXPECT--
string(8) "džljnjdz"
string(8) "džljnjdz"
string(8) "džljnjdz"
string(8) "DŽLJNJDZ"
string(8) "DŽLJNJDZ"
string(8) "DŽLJNJDZ"
string(8) "Džljnjdz"
string(8) "Džljnjdz"
string(8) "Džljnjdz"
string(3) "ᾳ"
string(3) "ᾳ"
string(3) "ᾼ"
string(3) "ᾼ"
string(3) "ᾼ"
string(3) "ᾼ"
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #71606 (Segmentation fault mb_strcut + mb_list_encodings)
--SKIPIF--
<?php
if (!extension_loaded('mbstring')) die('skip ext/mbstring not available');
?>
--FILE--
<?php
echo mb_strcut('&quot;', 0, 0, 'HTML-ENTITIES');
echo 'DONE', PHP_EOL;
?>
--EXPECT--
DONE
+8 -25
View File
@@ -6,24 +6,9 @@ mb_chr()
<?php
var_dump(
"\u{20bb7}" === mb_chr(0x20bb7),
"\x8f\xa1\xef" === mb_chr(0x8fa1ef, "EUC-JP-2004"),
"?" === mb_chr(0xd800)
);
mb_internal_encoding("UCS-4BE");
mb_substitute_character(0xfffd);
var_dump(
"\u{fffd}" === mb_chr(0xd800, "UTF-8")
);
mb_substitute_character(0xd800);
var_dump(
"?" === mb_chr(0xd800, "UTF-8")
);
mb_internal_encoding("EUC-JP");
mb_substitute_character(0xa4a2);
var_dump(
"?" === mb_chr(0xd800, "UTF-8")
"\x8f\xa1\xef" === mb_chr(0x50aa, "EUC-JP-2004"),
false === mb_chr(0xd800),
false === mb_chr(0x1f600, "EUC-JP-2004")
);
// Invalid
@@ -40,18 +25,16 @@ bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)
Warning: mb_chr(): Unknown encoding "typo" in %s on line 26
Warning: mb_chr(): Unknown encoding "typo" in %s on line %d
Warning: mb_chr(): Unsupported encoding "pass" in %s on line 27
Warning: mb_chr(): Unsupported encoding "pass" in %s on line %d
Warning: mb_chr(): Unsupported encoding "jis" in %s on line 28
Warning: mb_chr(): Unsupported encoding "jis" in %s on line %d
Warning: mb_chr(): Unsupported encoding "cp50222" in %s on line 29
Warning: mb_chr(): Unsupported encoding "cp50222" in %s on line %d
Warning: mb_chr(): Unsupported encoding "utf-7" in %s on line 30
Warning: mb_chr(): Unsupported encoding "utf-7" in %s on line %d
bool(false)
bool(false)
bool(false)
+8 -1
View File
@@ -6,7 +6,14 @@ mb_chr() and mb_ord()
<?php
ini_set('internal_encoding', 'utf-8');
for($ch = 1; $ch < 80000; $ch++) {
if ($ch !== mb_ord(mb_chr($ch))) echo "ERROR($ch)\n";
$str = mb_chr($ch);
if (false === $str) {
echo "ERROR($ch)\n";
continue;
}
if ($ch != mb_ord($str)) {
echo "REAL ERROR($ch)\n";
}
}
echo 'OK';
--EXPECTF--
+7 -3
View File
@@ -6,8 +6,8 @@ mb_ord()
<?php
var_dump(
0x20bb7 === mb_ord("\u{20bb7}"),
0x3f === mb_ord("\u{d800}"),
0x8fa1ef === mb_ord("\x8f\xa1\xef", "EUC-JP-2004")
false === mb_ord("\u{d800}"),
0x50aa === mb_ord("\x8f\xa1\xef", "EUC-JP-2004")
);
// Invalid
@@ -16,7 +16,8 @@ var_dump(
mb_ord("\u{d800}", "pass"),
mb_ord("\u{d800}", "jis"),
mb_ord("\u{d800}", "cp50222"),
mb_ord("\u{d800}", "utf-7")
mb_ord("\u{d800}", "utf-7"),
mb_ord("")
);
?>
--EXPECTF--
@@ -33,6 +34,9 @@ Warning: mb_ord(): Unsupported encoding "jis" %s 12
Warning: mb_ord(): Unsupported encoding "cp50222" %s 13
Warning: mb_ord(): Unsupported encoding "utf-7" %s 14
Warning: mb_ord(): Empty string in %s on line %d
bool(false)
bool(false)
bool(false)
bool(false)
@@ -38,6 +38,6 @@ int(1234)
bool(true)
string(4) "none"
Warning: mb_substitute_character(): Unknown character. in %s on line %d
Warning: mb_substitute_character(): Unknown character in %s on line %d
bool(false)
===DONE===
@@ -123,7 +123,7 @@ fclose($fp);
*** Testing mb_substitute_character() : usage variation ***
--int 0--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--int 1--
@@ -133,30 +133,30 @@ bool(true)
bool(true)
--int -12345--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--float 10.5--
bool(true)
--float -10.5--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--float 12.3456789000e10--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--float -12.3456789000e10--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--float .5--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--empty array--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--int indexed array--
@@ -169,25 +169,25 @@ bool(true)
bool(true)
--uppercase NULL--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--lowercase null--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--lowercase true--
bool(true)
--lowercase false--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--uppercase TRUE--
bool(true)
--uppercase FALSE--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--empty string DQ--
@@ -197,19 +197,19 @@ bool(true)
bool(true)
--string DQ--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--string SQ--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--mixed case string--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--heredoc--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--instance of classWithToString--
@@ -221,11 +221,11 @@ Error: 8 - Object of class classWithoutToString could not be converted to int, %
bool(true)
--undefined var--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
--unset var--
Error: 2 - mb_substitute_character(): Unknown character., %s(%d)
Error: 2 - mb_substitute_character(): Unknown character, %s(%d)
bool(false)
===DONE===
@@ -35,5 +35,5 @@ var_dump(bin2hex(mb_convert_encoding($string_mb, "ISO-8859-1", "UTF-8")));
string(14) "3f3f3f3f3f3f3f"
string(14) "42424242424242"
string(0) ""
string(0) ""
string(14) "3f3f3f3f3f3f3f"
===DONE===
+20 -6
View File
@@ -336,7 +336,9 @@ ordered_range_insert(ac_uint4 c, char *name, int len)
(len == 3 &&
(memcmp(name, "NSM", 3) == 0 || memcmp(name, "PDF", 3) == 0 ||
memcmp(name, "LRE", 3) == 0 || memcmp(name, "LRO", 3) == 0 ||
memcmp(name, "RLE", 3) == 0 || memcmp(name, "RLO", 3) == 0))) {
memcmp(name, "RLE", 3) == 0 || memcmp(name, "RLO", 3) == 0 ||
memcmp(name, "LRI", 3) == 0 || memcmp(name, "RLI", 3) == 0 ||
memcmp(name, "FSI", 3) == 0 || memcmp(name, "PDI", 3) == 0))) {
/*
* Mark all of these as Other Neutral to preserve compatibility with
* older versions.
@@ -350,8 +352,10 @@ ordered_range_insert(ac_uint4 c, char *name, int len)
break;
}
if (i == NUMPROPS)
return;
if (i == NUMPROPS) {
printf("Unknown property %s\n", name);
return;
}
/*
* Have a match, so insert the code in order.
@@ -539,6 +543,10 @@ add_title(ac_uint4 code)
*/
cases[2] = code;
/* If lower/upper case does not exist, stay the same */
if (!cases[0]) cases[0] = code;
if (!cases[1]) cases[1] = code;
if (title_used == title_size) {
if (title_size == 0)
title = (_case_t *) malloc(sizeof(_case_t) << 3);
@@ -825,7 +833,9 @@ read_cdata(FILE *in)
lineno = skip = 0;
while (fgets(line, sizeof(line), in)) {
if( (s=strchr(line, '\n')) ) *s = '\0';
int is_title = 0;
if( (s=strchr(line, '\n')) ) *s = '\0';
lineno++;
/*
@@ -968,6 +978,10 @@ read_cdata(FILE *in)
ordered_range_insert(code, s, e - s);
if (e - s == 2 && s[0] == 'L' && s[1] == 't') {
is_title = 1;
}
/*
* Locate the combining class code.
*/
@@ -1112,7 +1126,7 @@ read_cdata(FILE *in)
if (*s == ';')
s++;
}
if (cases[0] && cases[1])
if (is_title)
/*
* Add the upper and lower mappings for a title case character.
*/
@@ -1442,7 +1456,7 @@ write_cdata(char *opath)
" * LowerIndex = _uccase_len[0]\n"
" * TitleIndex = LowerIndex + _uccase_len[1] */\n\n");
fprintf(out, PREF "unsigned short _uccase_len[2] = {%ld, %ld};\n\n",
(long) upper_used * 3, (long) lower_used * 3);
(long) upper_used, (long) lower_used);
fprintf(out, PREF "unsigned int _uccase_map[] = {");
if (upper_used > 0)
+1932 -1687
View File
File diff suppressed because it is too large. Load diff
+7 -2
View File
@@ -1152,7 +1152,7 @@ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend
{
#if !defined(MYSQLI_USE_MYSQLND)
MYSQL_ROW row;
unsigned int i;
unsigned int i, num_fields;
MYSQL_FIELD *fields;
zend_ulong *field_len;
@@ -1166,8 +1166,9 @@ void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * result, zend
array_init(return_value);
field_len = mysql_fetch_lengths(result);
num_fields = mysql_num_fields(result);
for (i = 0; i < mysql_num_fields(result); i++) {
for (i = 0; i < num_fields; i++) {
if (row[i]) {
zval res;
@@ -1247,6 +1248,10 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags
php_error_docref(NULL, E_WARNING, "Could not find class '%s'", ZSTR_VAL(class_name));
return;
}
if (UNEXPECTED(ce->ce_flags & (ZEND_ACC_INTERFACE|ZEND_ACC_TRAIT|ZEND_ACC_IMPLICIT_ABSTRACT_CLASS|ZEND_ACC_EXPLICIT_ABSTRACT_CLASS))) {
zend_throw_error(NULL, "Class '%s' cannot be instantiated", ZSTR_VAL(ce->name));
return;
}
fetchtype = MYSQLI_ASSOC;
} else {
if (override_flags) {
+6 -4
View File
@@ -1210,7 +1210,7 @@ PHP_FUNCTION(mysqli_fetch_fields)
zval *mysql_result;
zval obj;
unsigned int i;
unsigned int i, num_fields;
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) {
return;
@@ -1219,8 +1219,9 @@ PHP_FUNCTION(mysqli_fetch_fields)
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
array_init(return_value);
num_fields = mysql_num_fields(result);
for (i = 0; i < mysql_num_fields(result); i++) {
for (i = 0; i < num_fields; i++) {
const MYSQL_FIELD *field = mysql_fetch_field_direct(result, i);
object_init(&obj);
@@ -1266,7 +1267,7 @@ PHP_FUNCTION(mysqli_fetch_lengths)
{
MYSQL_RES *result;
zval *mysql_result;
unsigned int i;
unsigned int i, num_fields;
#if defined(MYSQLI_USE_MYSQLND)
const size_t *ret;
#else
@@ -1284,8 +1285,9 @@ PHP_FUNCTION(mysqli_fetch_lengths)
}
array_init(return_value);
num_fields = mysql_num_fields(result);
for (i = 0; i < mysql_num_fields(result); i++) {
for (i = 0; i < num_fields; i++) {
add_index_long(return_value, i, ret[i]);
}
}
+24
View File
@@ -0,0 +1,24 @@
--TEST--
Bug #74968 PHP crashes when calling mysqli_result::fetch_object with an abstract class
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
require_once("connect.inc");
$mysqli = new mysqli("$host:$port", $user, $passwd, $db);
abstract class test {
public $a;
}
$mysqli->query("SELECT 1 as a")->fetch_object("test");
?>
==DONE==
--EXPECTF--
Fatal error: Uncaught Error: Class 'test' cannot be instantiated in %sbug74968.php:%d
Stack trace:
#0 %sbug74968.php(%d): mysqli_result->fetch_object('test')
#1 {main}
thrown in %sbug74968.php on line %d
@@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
require_once('connect.inc');
if (!$IS_MYSQLND)
die("skip Test for mysqlnd only");
<?php require_once('skipifemb.inc'); ?>
require_once('skipifemb.inc'); ?>
--FILE--
<?php
require_once('connect.inc');
Loaded 100 of 222 files, more files were not shown because too many files have changed in this diff. Show more