Compare commits

..
1024 Commits
Author SHA1 Message Date
Ilia Alshanetsky 254298cea9 5.2.12 2009-12-16 12:45:49 +00:00
Ilia Alshanetsky 38af726f28 5.2.12 2009-12-16 12:45:18 +00:00
Jani Taskinen 6c0b2a3a0e - Make $sbindir be usable in C code as well (like $bindir and co.) 2009-12-15 11:17:47 +00:00
Jani Taskinen eb84243d04 - Allow using $sbindir as well 2009-12-15 10:55:27 +00:00
Jani Taskinen 3a30b7dfca - Fix test 2009-12-14 09:42:32 +00:00
Pierrick Charron 2ded6af198 - Fixed bug #50469 (Fixed typo in imagepsencodefont error string). 2009-12-14 04:09:18 +00:00
Felipe Pena e4fb981bf0 - Improved the bug#49174 entry summary 2009-12-13 20:51:15 +00:00
Felipe Pena 0d4bf4110f - Fixed bug #49174 (crash on queryString set) 2009-12-13 19:53:44 +00:00
Felipe Pena 6b838aa6d2 - Opss, wrong place 2009-12-13 17:13:58 +00:00
Felipe Pena ef54c9c5ed - Fixed bug #50209 (Compiling with libedit cannot find readline.h)
(patch by tcallawa at redhat dot com)
2009-12-13 17:06:47 +00:00
Felipe Pena 481a5d8b18 - Fixed tests for when running using libedit 2009-12-13 16:53:24 +00:00
Felipe Pena cf9e914754 - Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes seg fault).
(Original patch by davbrown4 at yahoo dot com)
2009-12-11 22:30:46 +00:00
Jani Taskinen 9c445100c8 fix test 2009-12-11 15:06:50 +00:00
Jani Taskinen ff8c39c8e9 - Fix problem with SKIPIF failing to skip in some cases (deprecated warnings f.e.) 2009-12-11 07:34:06 +00:00
Ilia Alshanetsky 2e9192926f Back to dev 2009-12-10 13:16:23 +00:00
Ilia Alshanetsky 6512c8669f 5.2.12RC4 2009-12-10 13:07:39 +00:00
William Martin faee4c72b8 Backported 5.3 tests to 5.2 and added more RecursiveIteratorIterator tests 2009-12-08 19:51:56 +00:00
Dmitry Stogov f79bc0ac21 - Forgotten patch for trunk
- Fixed stdin filename in error messages
2009-12-08 10:16:38 +00:00
Sriram Natarajan 028ffa75f3 - Fix NEWS (48752 not relevant for 5.2 release) 2009-12-07 20:13:16 +00:00
Moriyoshi Koizumi 428088c848 - Take account of surrogate pairs. 2009-12-07 15:41:43 +00:00
Jani Taskinen 9fca678c47 - Fix NEWS 2009-12-07 07:30:41 +00:00
Pierrick Charron fcf959ad3e Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN even in the middle of a string). 2009-12-06 21:32:58 +00:00
Ilia Alshanetsky c21c2da229 Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN). 2009-12-06 19:34:12 +00:00
Felipe Pena be06106d62 - Fixed bug #50162 (Memory leak when fetching timestamp column from Oracle database)
- Fixed bug #34852 (Failure in odbc_exec() using oracle-supplied odbc driver) (patch by tim dot tassonis at trivadis dot com)
2009-12-06 18:53:16 +00:00
Ilia Alshanetsky cfa096dd4d BFN 2009-12-04 14:18:11 +00:00
Felipe Pena 69097f305c - Fixed tests 2009-12-04 11:32:39 +00:00
Stanislav Malyshev 86529ad73c protect http_session_vars from interrupt corruption
improve save_path check
2009-12-04 01:21:32 +00:00
Jani Taskinen b109e5bd82 bfn 2009-12-03 22:24:04 +00:00
Rob Richards 69ed9840ef fix bug #47848 (importNode doesn't preserve attribute namespaces)
add tests
2009-12-03 20:19:38 +00:00
Pierrick Charron 5a64467cba Fixed bug #45120 (PDOStatement->execute() returns true then false for same statement). 2009-12-03 15:24:43 +00:00
Felipe Pena 553191ea5c - Fixed bug #49472 (Constants defined in Interfaces can be overridden) 2009-12-03 12:34:50 +00:00
Jani Taskinen 84bc7c449c - Fixed bug #50345 (nanosleep not detected properly on some solaris versions) 2009-12-02 08:54:50 +00:00
Jani Taskinen eb3a2ee1b7 - Sync files 2009-12-02 08:22:05 +00:00
Ilia Alshanetsky 596dd39fa3 fixed typo 2009-12-01 13:23:28 +00:00
Felipe Pena 1ca7c27638 - Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
  single text node when using libxml2.7.3+. (Kalle)
[DOC]
2009-12-01 02:05:28 +00:00
Gwynne Raskind aa1904f4ab The old Darwin hack is BROKEN and INCORRECT. It works only for Darwin 9, not 10, and uses an ugly CFLAGS hack that messes with the entire build. This version sets one cached value to the correct result for Darwin 9 and 10. It's cleaner, has no side effects, has nothing to do with Autoconf versions, and works for everyone. 2009-11-30 21:38:44 +00:00
Jani Taskinen 565cec5cfc - Fix tests assuming wrong ini options and extensions that might not be there 2009-11-30 20:31:52 +00:00
Jani Taskinen be62e2c702 MFH: removed last test for MAX_INT, did not work on x64 and this case is covered by bug47745.phpt 2009-11-30 19:52:16 +00:00
Ilia Alshanetsky fb44cca847 bfn 2009-11-30 15:22:01 +00:00
Dmitry Stogov 38ba16b060 Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to non-existant file) 2009-11-30 14:43:22 +00:00
Jani Taskinen 3487ab7eb9 MF53: sync 2009-11-30 14:10:11 +00:00
Stanislav Malyshev 43d6b87ccb proper fix for bug #50006
add modify protection to all user array sorts
2009-11-29 08:35:01 +00:00
Rasmus Lerdorf 42c4e5c148 Revert attempt at supporting both autoconf 2.13 and
modern versions in the same build chain.  There are
simply too many broken things in 2.13 to make it work.
Cache handling is broken as well which is why I need
to revert the pdo_inc_path cache fix as well.

trunk is now 2.60+ only and I'll work on cleaning out
all the legacy cruft from there.
2009-11-29 06:13:22 +00:00
Stanislav Malyshev 50e31fe9c1 fix interrupt problem in serialize() 2009-11-29 04:38:46 +00:00
Jani Taskinen f34f334638 - Use correct revision 2009-11-28 00:47:42 +00:00
Jani Taskinen 87230feb91 - Fixed bug #50266 (conflicting types for llabs) 2009-11-28 00:38:05 +00:00
Jani Taskinen 8eb333ffa2 - No dots here 2009-11-28 00:35:56 +00:00
Jani Taskinen af0595c40b - Fix bad merge (Sorry Ilia..) 2009-11-28 00:06:54 +00:00
Rasmus Lerdorf c4ec9018f5 Fix bug #50315 2009-11-27 23:41:13 +00:00
Ilia Alshanetsky abb6a035d3 back to dev 2009-11-27 14:50:28 +00:00
Ilia Alshanetsky ee12cbd751 5.2.12RC3 2009-11-27 14:25:58 +00:00
Jani Taskinen e85a2dd296 - Partially revert the autoconf 2.6x "fix" to make configure work with release 2009-11-27 12:51:41 +00:00
Jani Taskinen 01ba3e44b3 - Re-fixed bug #47104 (Linking shared extensions fails with icc) 2009-11-27 12:50:29 +00:00
Ilia Alshanetsky 14909202a8 Back to dev 2009-11-27 03:17:06 +00:00
Ilia Alshanetsky df4b288737 5.2.12RC2 2009-11-27 03:14:36 +00:00
Ilia Alshanetsky ea3faadf6a Revert gmp patches as they require a newer lib 2009-11-27 03:13:59 +00:00
Ilia Alshanetsky 5ef06b0c62 Fixe build 2009-11-27 03:02:01 +00:00
David Soria Parra fa955848f6 Also allow base 62 for gmp_init as requested in (#50283) 2009-11-25 23:38:34 +00:00
Rasmus Lerdorf ce6bb055e1 There is no ENT_IGNORE in 5.2 2009-11-25 18:58:14 +00:00
David Soria Parra 6bdc96f68b Really use 62 as the upper boundary as requested and not 32. 2009-11-25 18:15:25 +00:00
Rasmus Lerdorf fbd9757a39 Missing _cv_ here 2009-11-25 16:53:23 +00:00
Ilia Alshanetsky a08f0425de Fixed bug #50195 (pg_copy_to() fails when table name contains schema). 2009-11-25 14:28:00 +00:00
Jani Taskinen 8c3509c894 - Fixed bug #49677 (ini parser crashes with apache2 and using ${something} ini variables) 2009-11-25 12:35:42 +00:00
Jani Taskinen 1eaf99d866 ws 2009-11-25 12:26:10 +00:00
Jani Taskinen 4e4cd57658 - Do not forget NEWS for 5.2.. 2009-11-25 07:21:38 +00:00
Rasmus Lerdorf fbfef72ba5 Another test that doesn't work as root 2009-11-25 04:00:55 +00:00
Rasmus Lerdorf 707074aa6f These tests don't work when run as root 2009-11-25 03:53:50 +00:00
Felipe Pena 50ca6f0fa1 - Fixed bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays) 2009-11-25 02:03:02 +00:00
Rasmus Lerdorf e5f42bfd06 Missed a few - now it really works with autoconf-2.64+ 2009-11-25 01:36:41 +00:00
Rasmus Lerdorf cb397e86ea Someone strap down Jani and give him a sedative please.
This makes our toolchain work with the latest versions
of autoconf and avoids a lot of end-user grief.
2009-11-25 01:30:06 +00:00
Felipe Pena a12e272b9a - Fixed bug #50255 (isset() and empty() silently casts array to object) 2009-11-24 21:54:12 +00:00
Jani Taskinen eba3dd019e - Fix news 2009-11-24 14:14:13 +00:00
Rasmus Lerdorf bee4607345 Fix null deref found by Michael Maclean 2009-11-24 13:57:39 +00:00
Ilia Alshanetsky e91b12acc7 Add myself as pdo_pgsql maintainer 2009-11-24 13:51:53 +00:00
David Soria Parra 0dc1918687 Implement feature request #50283 (allow base in gmp_strval to use full range: 2 to 62, and -2 to -36) 2009-11-24 13:33:35 +00:00
Felipe Pena 7a5348280e - Fixed bug #50282 (xmlrpc_encode_request() changes object into array in calling function) 2009-11-24 11:32:31 +00:00
Jani Taskinen 0dd637ea57 - Upgraded bundled libtool to 1.5.26 2009-11-23 21:54:46 +00:00
Rasmus Lerdorf 452ffe21a2 Need the PCNTL extension loaded since that is where the SIGKILL constant comes from 2009-11-23 21:24:20 +00:00
Rasmus Lerdorf 89a570638b This will only get a permission defined error if not running as root. 2009-11-23 21:13:26 +00:00
Rasmus Lerdorf 87a7fa0abf Don't try to remove an empty output_obj here.
This gets rid of the annoying:
rm: invalid argument: `'
I was seeing.
(I really shouldn't be hacking libtool)
2009-11-23 16:51:45 +00:00
Rasmus Lerdorf 84a4d1c20c When Ilia fixed bug #49470 and removed the '/' as a valid
email char, he forgot to make the corresponding change in
filter test 033.
2009-11-23 14:54:57 +00:00
Ilia Alshanetsky 54727670c3 Extend the previously added large string concatenation validation 2009-11-23 04:12:36 +00:00
Jani Taskinen 6c621b15cd - Fixed error_log() to be binary safe when using message_type 3 (message appended to file). 2009-11-22 18:31:01 +00:00
Pierre Joye d2c593017d - add tests dir 2009-11-22 12:34:10 +00:00
Felipe Pena 07db754f8d - Fixed bug #50258 (typos in error strings) 2009-11-21 19:43:00 +00:00
Pierrick Charron 8f3677601e Fixed bug #50219 (soap call Segmentation fault on a redirected url). 2009-11-21 01:22:32 +00:00
Ilia Alshanetsky d3949380b8 Don't ignore the 2nd parameter to PDO's quote() method that identifies the data type 2009-11-20 18:54:08 +00:00
Ilia Alshanetsky 1a174b0828 Fixed bug #50207 (segmentation fault when concatenating very large strings
on 64bit linux).
2009-11-19 14:04:34 +00:00
Jani Taskinen 237feb2149 - Fix news 2009-11-18 17:59:18 +00:00
Jani Taskinen da729f3874 - Fixed "make test" in phpize builds when ini file(s) contain extension directives 2009-11-18 17:52:22 +00:00
Jani Taskinen 2ce1d0056d - Fixed bug #50185 (ldap_get_entries() return false instead of an empty array when there is no error).
# This is also revert of bad patch to bug #48469 and fixes it properly.
2009-11-18 17:44:58 +00:00
Rasmus Lerdorf 9a7db58096 News entry for post_max_size fix 2009-11-17 20:41:47 +00:00
Rasmus Lerdorf 456c790c63 Make it possible to disable post_max_size 2009-11-17 20:33:51 +00:00
Ilia Alshanetsky dea8172f6d tz news 2009-11-17 15:04:20 +00:00
Derick Rethans 2767484162 - Updated to version 2009.19 (2009s) 2009-11-16 15:57:13 +00:00
Ilia Alshanetsky 87c7c2a3d1 Simpify the max_file_uploads handling code 2009-11-16 13:34:57 +00:00
Felipe Pena 0e8c20106f - Improve test 2009-11-15 17:05:48 +00:00
Felipe Pena ff62865fc0 - Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses containing = or ?).
(Patch by Pierrick)
2009-11-15 16:53:40 +00:00
Felipe Pena ae35c47a4b - Fixed bug #49521 (PDO fetchObject sets values before calling constructor)
(patch by Pierrick)
2009-11-15 16:20:37 +00:00
Jani Taskinen 0d71754a2e - Temporary hack to fix bug #49816 (works fine in HEAD which has working output buffering..) 2009-11-15 00:13:19 +00:00
Felipe Pena df042dc98e - Fixed bug #50174 (Incorrectly matched docComment) 2009-11-14 19:17:22 +00:00
Ilia Alshanetsky 38e95f692f Back to dev 2009-11-12 15:52:23 +00:00
Ilia Alshanetsky 6880bcc319 5.2.12RC1 2009-11-12 15:42:52 +00:00
Jani Taskinen 84543c1ee7 bfn 2009-11-12 09:07:51 +00:00
Rasmus Lerdorf d5dacfc274 NEWS entries for mysqli crash fix bug 2009-11-12 08:26:43 +00:00
Rasmus Lerdorf 9dc54d8483 Fix for bug #49098 2009-11-12 08:20:57 +00:00
Felipe Pena bb524935a3 - Fixed bug #50005 (Throwing through Reflection modified Exception object makes segmentation fault) 2009-11-12 00:10:00 +00:00
Ilia Alshanetsky 1d2a24f530 tz news 2009-11-10 13:18:33 +00:00
Jani Taskinen c94ac24231 - Fix bad section names (extra - in the end..) 2009-11-09 17:08:48 +00:00
Rasmus Lerdorf d6fd508045 Fix bug #50128 2009-11-09 16:47:47 +00:00
Derick Rethans cd1195c44e - Updated to version 2009.18 (2009r) 2009-11-09 15:39:15 +00:00
Ilia Alshanetsky 57b251cee8 Fixed typo 2009-11-09 13:28:13 +00:00
Rasmus Lerdorf 67259ce03b Fix bug #50115 2009-11-08 15:18:10 +00:00
Felipe Pena 4f8253338c - Added SKIPIF 2009-11-08 15:02:54 +00:00
Felipe Pena 4f6fa0ba12 - Fixed bug #50090 (Typo in IteratorIterator constructor) 2009-11-07 21:27:15 +00:00
andy wharmby b614214638 Fix tests 2009-11-05 22:44:02 +00:00
Ilia Alshanetsky 53952fef26 Make sure that max_file_uploads is set to 20 by-default in all places 2009-11-05 13:29:34 +00:00
Jani Taskinen 9096aef11a - The dot 2009-11-05 11:32:53 +00:00
Dmitry Stogov 1d5c137b00 Avoid invoking setitimer when timeouts have been disabled (Arvind Srinivasan) 2009-11-05 10:38:56 +00:00
Dmitry Stogov 1e52beff0f Fixed unnecessary invokation of setitimer when timeouts have been disabled (Arvind Srinivasan) 2009-11-05 09:33:19 +00:00
Matteo Beccati 2a481b01fb - Properly fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction).
# Removed usage of the memory address when generating prepared statemend names
# as uniqueness can't be enforced. Used a statment counter instead.
2009-11-04 19:32:27 +00:00
Matteo Beccati c4bee3fa96 - Reverting previous fix for bug #49985
# Unmerged changes from revision 289924
2009-11-04 19:16:39 +00:00
Ilia Alshanetsky 18a433f0d9 Fixed bug #50073 (parse_url() incorrect when ? in fragment). 2009-11-04 13:44:10 +00:00
Guenter Knauf c6b89853ef fixed build-in module list for NetWare. 2009-11-03 19:03:49 +00:00
Guenter Knauf 170b33dec0 cleaned up includes for NetWare. 2009-11-03 18:56:47 +00:00
Guenter Knauf 2dcdcd8d5f added magic.mine path define for NetWare. 2009-11-03 18:44:11 +00:00
Guenter Knauf 5703dbea03 added timezone define for NetWare. 2009-11-03 18:24:57 +00:00
Guenter Knauf 389811a6c5 removed now obsolete NetWare hack since I fixed this
with Novell some longer time ago in their SDK header.
2009-11-03 18:03:02 +00:00
Guenter Knauf b256c06592 removed now obsolete NetWare hack since I fixed this
with Novell some longer time ago in their SDK header.
2009-11-03 17:58:17 +00:00
Guenter Knauf c75d7f3af5 removed now obsolete NetWare hack since I fixed this
with Novell some longer time ago in their SDK header.
2009-11-03 17:50:10 +00:00
Guenter Knauf 693e138d5d removed now obsolete NetWare hack since I fixed this
with Novell some longer time ago in their SDK header.
2009-11-03 17:38:44 +00:00
Guenter Knauf 1434f64b7d removed now obsolete NetWare hack since I fixed this
with Novell some longer time ago in their SDK header.
2009-11-03 17:32:58 +00:00
Guenter Knauf 44f8c63ff5 removed now obsolete NetWare hack since I fixed this
with Novell some longer tiem ago in their SDK header.
2009-11-03 17:16:45 +00:00
Guenter Knauf dad7ada835 removed now obsolete NetWare hack since I fixed this
with Novell some longer tiem ago in their SDK header.
2009-11-03 17:11:09 +00:00
Ilia Alshanetsky 9676c4b0ea TZ update 2009-11-03 13:14:33 +00:00
Felipe Pena 4dbc65c7b7 - Fixed bug #49244 (Floating point NaN cause garbage characters). (patch by Sjoerd) 2009-11-02 17:37:32 +00:00
Derick Rethans a1fe3c1401 - Updated to version 2009.17 (2009q) 2009-11-02 16:12:20 +00:00
Ilia Alshanetsky 0b4c25d916 Fixed compiler warnings 2009-11-02 13:33:24 +00:00
Ilia Alshanetsky 31a64059ca TZ news 2009-11-02 04:06:57 +00:00
Felipe Pena fa23faaca4 - Fixed bug #50006 (Segfault caused by uksort()) [5_2 only] 2009-11-01 17:30:55 +00:00
Felipe Pena caa28c2a22 - Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private property in base class) 2009-11-01 15:12:34 +00:00
Takeshi Abe 494877cbd1 Fixed a possible memory leak in case that FT_Glyph_To_Bitmap() fails 2009-11-01 05:04:35 +00:00
Pierre Joye b7fe1fe3d8 - back to dev #2 and fix snap :) 2009-10-31 09:45:53 +00:00
Ilia Alshanetsky 6105b12333 Lower the max upload default to 20 2009-10-28 13:04:42 +00:00
Jani Taskinen a3268aef52 - Fix news 2009-10-27 22:18:25 +00:00
Jani Taskinen 094bb76bbf - You add, remove, fix or implement. Introduce yourself to someone else. 2009-10-27 22:15:19 +00:00
Felipe Pena cf7e439938 - Fixed bug #50018 (Typo in spl_limit_it_seek()) 2009-10-27 21:57:26 +00:00
Felipe Pena dda3dfff9b - Fixed memory leak in openssl_pkcs12_export_to_file() 2009-10-27 21:37:03 +00:00
Pierre Joye 1d51c0f7d6 - Fixed crash in com_print_typeinfo when an invalid typelib is given 2009-10-27 19:16:55 +00:00
Felipe Pena 7b6dce6a62 - Fix build 2009-10-27 16:21:03 +00:00
Ilia Alshanetsky 10a048bc3f Introduced a max_file_uploads INI setting, which is set to limit the
number of file uploads per-request to 100 by default, to prevent possible
DOS via temporary file exhaustion.
2009-10-27 16:13:48 +00:00
Pierre Joye 0b18abd2f2 - #48752 2009-10-27 10:44:11 +00:00
Pierre Joye 2c210cadd6 - #48752, crash during date parsing with invalid date 2009-10-27 10:41:45 +00:00
Derick Rethans a5f518f00a - Updated to version 2009.16 (2009p) 2009-10-26 14:09:23 +00:00
Ilia Alshanetsky 91be772174 Fixed bug #49921 (Curl post upload functions changed). 2009-10-26 12:57:01 +00:00
Ilia Alshanetsky 4d7a588951 - Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction). 2009-10-26 02:02:28 +00:00
Jani Taskinen 1719e7c300 - Fixed bug #49990 (SNMP3 warning message about security level printed twice). 2009-10-25 20:17:04 +00:00
Johannes Schlüter e5e26d817e Fix #49972 (AppendIterator undefined function crash) 2009-10-23 16:47:35 +00:00
Ilia Alshanetsky e94965d0a7 Fixed test 2009-10-22 19:39:08 +00:00
Derick Rethans 697277d152 - Updated to version 2009.15 (2009o) 2009-10-19 16:29:13 +00:00
Jani Taskinen 880b090479 - It is not const in PHP_5_2 but it is in HEAD and PHP_5_3 2009-10-19 15:34:50 +00:00
Jani Taskinen c0677af865 - It is close to next 5.2 release, ILIA! 2009-10-19 12:42:10 +00:00
Scott MacVicar eb9ca1bf82 Fix bug #49332 - Unable to compile with Snow Leopard due to some DNS funsies 2009-10-16 16:09:49 +00:00
Ilia Alshanetsky 33b43d710f Fixed bug #49855 (import_request_variables() always returns NULL). 2009-10-15 12:26:54 +00:00
Guenter Knauf 85037bbfad zend_module_dep is no const and breaks strict compilers
like CodeWarrior for NetWare.
2009-10-14 19:29:37 +00:00
Ilia Alshanetsky 22d7581a9b tz update news 2009-10-14 12:28:37 +00:00
Ilia Alshanetsky 1bc451744f Fixed bug #49847 (exec() fails to return data inside 2nd parameter, given output lines >4095 bytes). 2009-10-14 01:32:07 +00:00
Derick Rethans 29aa08e3a8 - Updated to version 2009.14 (2009n) 2009-10-13 08:16:35 +00:00
Moriyoshi Koizumi f77a222897 - Bug #49785: take 5. What the hell happened to me... 2009-10-13 05:18:37 +00:00
Felipe Pena ac2bdbaeb0 - BFN 2009-10-12 19:23:07 +00:00
Felipe Pena b46243e2e2 - Fixed possible crash when calling SQLiteDatabase::{ArrayQuery, SingleQuery} methods using Reflection 2009-10-12 19:04:00 +00:00
Felipe Pena 3ef866882a - Fixed PDORow and PDOStatement crashes when instantiating throught Reflection 2009-10-12 17:09:11 +00:00
Moriyoshi Koizumi 040871458c - Bug #49785: take 4 - typo. this flaw is unharmful since the return value of get_next_char() is only used when UTF-8 is specified to the third argument. 2009-10-12 14:29:45 +00:00
Moriyoshi Koizumi 18b0a78708 - Bug #49785: take 3 - fixed infinite loop bug (only for 5.2) (reported by T.Komura. Thanks) 2009-10-12 14:25:51 +00:00
Pierre Joye e394a130f6 - check max colors while loading gd2 palette image (patch by Tomas Hoger) 2009-10-12 10:01:37 +00:00
Moriyoshi Koizumi b8175c7919 - A couple more fix for my previous fix.
(one of the fix by Arnaud Le Blanc. Thanks!)
2009-10-11 23:52:33 +00:00
Moriyoshi Koizumi efacbfff88 - More tests to go. 2009-10-09 17:13:05 +00:00
Moriyoshi Koizumi 2594c77511 - Fixed bug #49785 (insufficient input string validation of htmlspecialchars()). 2009-10-09 10:02:38 +00:00
Ilia Alshanetsky 2595252ebf Syntax 2009-10-09 02:15:22 +00:00
Jani Taskinen 98a8665383 - Fixed bug #49809 (time_sleep_until is not available on solaris) 2009-10-08 14:21:53 +00:00
Jani Taskinen 875c91b415 - Fixed bug #49503 (invalid warning for failed semaphore file creation)
# I have no idea why I had added this. Might have been some debug code.. :(
2009-10-08 10:33:26 +00:00
Ilia Alshanetsky f9b8139e65 Revert fix, not relavent for this branch 2009-10-08 02:21:36 +00:00
Matteo Beccati 29b7b871b7 - Fixed bug #48764 (PDO_pgsql::query always uses implicit prepared statements if v3 proto available)
# original patch by Mark Kirkwood
2009-10-07 17:40:16 +00:00
Ilia Alshanetsky a6321016da Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning).
# original patch by wmeler at wp-sa dot pl
2009-10-07 12:46:29 +00:00
Etienne Kneuss cf2c0f3ee3 Fix bug #49263 (Offset error when unserializing self-references in SplObjectStorage) 2009-10-06 13:34:56 +00:00
Ilia Alshanetsky 5007c77a31 Formatting tweaks 2009-10-06 12:52:32 +00:00
Jani Taskinen bf34edee8f pff 2009-10-06 10:00:53 +00:00
Ilia Alshanetsky c21d59c08e Fixed bug #49757 (long2ip() can return wrong value in a multi-threaded applications).
# original patch by Florian Anderiasch
2009-10-05 14:45:54 +00:00
Dmitry Stogov 25209f9a71 Fixed bug #49627 (error_log to specified file does not log time according to date.timezone) 2009-10-05 13:56:49 +00:00
Sriram Natarajan 0de483dcf4 - Fixed bug #49738 (calling mcrypt after mcrypt_generic_deinit crashes). 2009-10-02 00:13:53 +00:00
Ilia Alshanetsky bbc9b86f0d Fixed typo 2009-10-01 23:21:36 +00:00
Ilia Alshanetsky ce1b22fd85 Fixed bug #48805 (IPv6 socket transport is not working). 2009-09-30 20:48:41 +00:00
Felipe Pena 4c2d3cace1 - Fix build 2009-09-30 11:25:13 +00:00
Ilia Alshanetsky 67303f2999 Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after fclose). 2009-09-30 02:34:17 +00:00
Felipe Pena c5d06308b1 - Fix build 2009-09-29 23:36:30 +00:00
Rafael Machado Dohms 98ce43e431 Fixing tests for head and wrong SKIPIF blocks 2009-09-29 14:34:06 +00:00
Rasmus Lerdorf bbd230d119 Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak. 2009-09-29 14:14:02 +00:00
Rasmus Lerdorf d5ee6d613d Add missing open_basedir check in posix_mkfifo 2009-09-29 14:02:50 +00:00
Rasmus Lerdorf 4ddffe7b35 Fix date_sunrise/date_sunset tests 2009-09-29 13:56:51 +00:00
Rafael Machado Dohms 198361e012 Adding tests for bug #49692 2009-09-28 22:57:41 +00:00
Kalle Sommer Nielsen bc72db169b NEWS for Rasmus' bug fix 2009-09-28 15:07:37 +00:00
Rasmus Lerdorf 5803d3b029 Fix for bug #49698 2009-09-28 13:29:53 +00:00
Ilia Alshanetsky 3758a57bba Fixed build 2009-09-28 13:11:21 +00:00
Felipe Pena 22693aa7fb - Fixed tests 2009-09-26 17:59:33 +00:00
Felipe Pena 6a1736de17 - Fixed tests 2009-09-26 16:55:11 +00:00
Rasmus Lerdorf 2b2fb3fd49 Refix bug #49558 as per bug #49676 2009-09-26 00:53:59 +00:00
Andrey Hristov ef17ae4ecb Fix returned value, if mysql_stmt_attr_set fails
then mysqli returns true, otherwise false. Wrong logic.
2009-09-25 12:35:58 +00:00
Antony Dovgal d5cf5939f8 MFH: save LDFLAGS in EXTRA_LDFLAGS before unsetting
this patch makes sure that LDFLAGS are taken into account when
configuring the build
2009-09-25 07:10:29 +00:00
Felipe Pena 845bfd0a0c - Reverted last Ilia's change (looks as accidental in this branch, as it was in popen() not tempnam(), and it doesnt need to be changed here) 2009-09-25 01:53:02 +00:00
Jani Taskinen fc79d27624 fn 2009-09-24 22:40:15 +00:00
Ilia Alshanetsky 722b937b8f Make tempnam() return FALSE on error as documented 2009-09-24 18:59:28 +00:00
Sriram Natarajan cc83bf0be2 - Rollback fix for bug #49571 (CURLOPT_POSTREDIR not implemented).
# - Features don't go into PHP 5.2
2009-09-24 18:45:09 +00:00
Sriram Natarajan bbba732e79 - Fixed bug #49571 (CURLOPT_POSTREDIR not implemented). 2009-09-24 18:20:49 +00:00
Rob Richards 8324654b13 MFH: Fixed bug #49647 (DOMUserData does not exist) 2009-09-24 15:10:21 +00:00
Rob Richards 976fbc7006 fix memleak 2009-09-24 12:40:59 +00:00
Moriyoshi Koizumi c2471b4950 - Fixed bug #49354 (mb_strcut() cuts wrong length when offset is within a
multibyte character).

(This bug was introduced by the commit by r202895. Please double-check the
 specification of the function you are going to *fix*.)
2009-09-23 15:22:47 +00:00
Moriyoshi Koizumi 4a391f68d5 * Merge two patches from 5.3 branch (intentionally uncommited because 5.2.11
was about to come at that time).
2009-09-23 14:26:51 +00:00
Dmitry Stogov 5bd58e538e Fixed ext/standard/tests/streams/stream_get_contents_002.phpt 2009-09-23 10:25:54 +00:00
Felipe Pena c0735c68da - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE cannot be set ...") 2009-09-23 02:08:19 +00:00
Felipe Pena 7cbdfd2757 - Fixed bug #49630 (imap_listscan function missing)
# Missing PHP_FE(), though nowdays it is used through of two aliases. (imap_scan() and imap_scanmailbox())
2009-09-22 18:18:57 +00:00
Dmitry Stogov 02dd12385b Fixed tests which fail from time to time because of race conditions ("echo" command didn't wait for all the data php tried to send and as result php got a SIGPIPE) 2009-09-22 14:52:47 +00:00
Dmitry Stogov 5c51b3f11a Fixed test (it failed from time to time because of very small timeouts) 2009-09-22 10:15:10 +00:00
Jani Taskinen ca1692fe16 - Move tests in the right location 2009-09-22 09:41:39 +00:00
Dmitry Stogov c2dbf60325 Fixed test 2009-09-22 08:47:30 +00:00
Dmitry Stogov d5d77c1beb Fixed test (removed "bad" locale) 2009-09-22 08:22:29 +00:00
Dmitry Stogov 88586426d4 Fixed tests ("none" is an alias of "false" and it can't be used as a string value of ini option) 2009-09-21 14:32:20 +00:00
Dmitry Stogov 943d08ee0f Fixed tests/lang/bug22592.phpt 2009-09-21 13:32:10 +00:00
Dmitry Stogov b164d2b97c Fixed memleak in tests/lang/engine_assignExecutionOrder_001.phpt 2009-09-21 13:01:17 +00:00
Dmitry Stogov 76ff5590c2 Fixed tests 2009-09-21 11:30:38 +00:00
Dmitry Stogov 4061a72664 Fixed memory leak 2009-09-21 11:22:13 +00:00
Ilia Alshanetsky 6db1f59938 WS 2009-09-21 02:51:15 +00:00
Hannes Magnusson c6bc88db3a BFN 2009-09-17 11:43:29 +00:00
Hannes Magnusson dc2f690377 Fixed bug#49578 (make install-pear fails)
# Apparently this script was using 5.3 functionality
# Workaround would be to install 'wget'
2009-09-17 11:36:29 +00:00
Sriram Natarajan b91f37fdc0 - Fixed bug #49572 (use of C++ style comments causes build failure) 2009-09-17 02:45:25 +00:00
Ilia Alshanetsky 77fd5b8075 5.2.11 news cleanup 2009-09-16 22:46:37 +00:00
Ilia Alshanetsky ba855e4824 Back to dev 2009-09-16 12:55:51 +00:00
Ilia Alshanetsky 9a983f9ccf 5.2.11 2009-09-16 12:54:51 +00:00
andy wharmby 80e91e8f0d Fix SKIPIF sections 2009-09-15 21:44:08 +00:00
Rasmus Lerdorf 4c92f98c4e Fix for bug #49558 for 5.2 and HEAD as well. 2009-09-15 20:34:54 +00:00
Moriyoshi Koizumi 911228f106 - WS fix (spaces to tabs) 2009-09-15 00:09:13 +00:00
Jani Taskinen 80fee52884 pfft 2009-09-14 17:18:27 +00:00
Ulf Wendel 58c3410689 Backport of http://news.php.net/php.cvs/60381 to PHP 5_2 which fixes a potential crash with ext/mysqli and Prepared Statements if the MySQL Server sends faulty metadata, see also http://news.php.net/php.cvs/60389 . I don't know of a way to crash PHP using a recent MySQL. But metadata has been a troublemaker in the past. Just in case... 2009-09-14 16:51:11 +00:00
Ilia Alshanetsky 4d4871f578 Fixed certificate validation inside php_openssl_apply_verification_policy 2009-09-14 12:50:30 +00:00
Moriyoshi Koizumi e5b872a817 - Looks like bug #48697 has already been fixed in RC1. 2009-09-14 04:11:29 +00:00
andy wharmby c6849dc9ba Add missing SKIPIF 2009-09-11 21:57:04 +00:00
Ilia Alshanetsky d32efcaeaf Back to dev 2009-09-10 12:16:30 +00:00
Ilia Alshanetsky 82d6e7855d 5.2.11RC3 2009-09-10 12:14:51 +00:00
Ilia Alshanetsky 275909c813 Fixed test 2009-09-10 02:15:08 +00:00
Felipe Pena c068f17a31 - Possible fix for bug #49344 on Windows (pdo_mssql fails to connect,throws PDOException SQLSTATE[] (null) (severity 0)) 2009-09-10 01:20:42 +00:00
Jani Taskinen 5f4a55c67f Ihnetd. 2009-09-09 07:38:03 +00:00
Ilia Alshanetsky 8f584b3207 TZ news 2009-09-08 22:14:29 +00:00
Derick Rethans dbac748812 - Updated to version 2009.13 (2009m) 2009-09-08 14:03:53 +00:00
Ilia Alshanetsky f21a5b2332 Fixed tests 2009-09-07 14:18:46 +00:00
Ilia Alshanetsky 27fb503751 Fixed bug #49470 (FILTER_SANITIZE_EMAIL allows disallowed characters). 2009-09-07 02:35:25 +00:00
Pierre Joye d5ab5a6452 - revert last commit, breaks the build and needs test case(s) 2009-09-06 15:56:58 +00:00
Moriyoshi Koizumi 1fee2957ae - Fix leaks. 2009-09-06 14:43:09 +00:00
Pierre Joye 98c32cf3b0 - WS 2009-09-05 19:01:06 +00:00
Pierre Joye ac40eed89d - don't hide early declaration 2009-09-05 19:00:05 +00:00
Pierre Joye 8d17f0c2cc - fix #49274, filter_var does not accept object without a toString implementation 2009-09-05 17:35:26 +00:00
Jani Taskinen 0be7c56f86 - This was not supposed to be committed.. 2009-09-05 17:11:44 +00:00
Jani Taskinen 06f5b207c9 - Fixed bug #49182 (PHP CGI always outputs the shebang line) 2009-09-05 17:07:14 +00:00
Jani Taskinen d12cfe5b07 - some styling 2009-09-04 22:11:32 +00:00
Sriram Natarajan 8926fbaf26 - Fixed bug #49447 (php engine need to correctly check for socket API
return status on windows). (Sriram Natarajan)
2009-09-04 07:59:48 +00:00
Matteo Beccati 2acedb40e6 MFH
- Fixed bug #48060 (pdo_pgsql - large objects are returned as empty)
# Backported from 5.3.0, per gripe from Konstantin Ryabitsev
# Permission granted by Ilia
2009-09-03 22:53:25 +00:00
Sebastian Bergmann d9eeb2e6e6 Make invokeArgs() error messages consistent with invoke(). 2009-09-03 14:02:51 +00:00
Pierre Joye 1b7cad9a28 - missing ) 2009-09-03 12:54:46 +00:00
Jani Taskinen 9c6d53b68c - Prepare for b-day :D 2009-09-03 12:20:26 +00:00
Ilia Alshanetsky efcefa9fd9 Back to dev 2009-09-03 12:16:47 +00:00
Ilia Alshanetsky a2c78531df 5.2.11RC2 2009-09-03 12:14:58 +00:00
Pierre Joye 79868f8566 - Fix sanity check for the color index in imagecolortransparent 2009-09-03 09:45:56 +00:00
Ilia Alshanetsky e46f05a0a2 Fixed return value to comply with tests 2009-09-02 13:07:44 +00:00
Jani Taskinen ca5c15efe4 - Add missing bug fixing news 2009-09-02 06:30:47 +00:00
Patrick Allaert 3891e2a52e Merging last tests made in HEAD 2009-09-01 13:41:18 +00:00
Patrick Allaert 7c56a4d498 Fixing #49424 (#48696): segfault while using ldap_search(), ldap_read(),... 2009-09-01 08:42:10 +00:00
Jani Taskinen 9251699926 fix typo 2009-08-31 21:19:29 +00:00
Jani Taskinen 532e142459 - Fixed zlib.deflate compress filter to actually accpet level parameter. 2009-08-31 21:18:55 +00:00
Zoe Slattery f03552c27d add missing skipifs 2009-08-31 19:22:29 +00:00
Ilia Alshanetsky ec9c7a4599 Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries). 2009-08-31 12:28:46 +00:00
Jani Taskinen 780bda4ce1 MF53: - Fixed bug #49000 (PHP CLI in Interactive mode (php -a) crashes when including files from function), see also bug #49405 2009-08-31 12:07:27 +00:00
Zoe Slattery 58aeff1978 The last of the 2009 testfest tests 2009-08-30 18:18:50 +00:00
Pierre Joye a966ab428a - Fixed leak on error in popen/exec (and related functions) 2009-08-30 17:13:45 +00:00
Zoe Slattery 7aa125747e More tests from 2009 testfest 2009-08-30 12:19:50 +00:00
Zoe Slattery ffa06648fd bc math tests from testfest 2009 2009-08-30 11:10:20 +00:00
Zoe Slattery 076ada3a46 server for ftp tests 2009-08-30 09:31:54 +00:00
Zoe Slattery 28c5f6948b More tests from 2009 testfest 2009-08-30 09:30:13 +00:00
Zoe Slattery 77cd4db9cc Fixed to allow for http etc 2009-08-30 08:18:53 +00:00
andy wharmby 62426919df New basic network function tests. Tested on Windows, Linux and Linux 64 bit 2009-08-28 22:46:43 +00:00
Zoe Slattery fa2b95c95a More tests from 2009 testfest 2009-08-28 14:31:19 +00:00
andy wharmby b5145cb74d Fix time_sleep_until() tests; not supported on Windows on 5.2 2009-08-27 19:30:35 +00:00
andy wharmby 9ea28dd365 Fix tests. Add missing SKIPIF sections so test do not run when POSIX extension not available. 2009-08-27 12:21:19 +00:00
Rasmus Lerdorf e71fee906e This needs to be larger to avoid an overflow on the bit-shifting in this function 2009-08-27 05:05:42 +00:00
Pierre Joye 0d332b4edb - fix #49372, segfault in php_curl_option_url 2009-08-26 22:24:10 +00:00
Pierre Joye 1cbf3eb6c3 - silent warning (fix for #28038) 2009-08-26 21:59:54 +00:00
Pierre Joye b80812021e - update 2009-08-26 20:03:49 +00:00
Pierre Joye f19b49815c - fix #44683, popen crashes when an invalid mode is passed (works on 2k8/vista/win7) 2009-08-26 19:57:01 +00:00
Pierre Joye 963575b07f - fix build (pls at least try to compile before committing) 2009-08-26 19:15:13 +00:00
Zoe Slattery 7e791e6e19 Test from 2009 testfest 2009-08-26 17:17:58 +00:00
Ilia Alshanetsky 56510b5aaf Fixed variable clobbering 2009-08-26 15:29:06 +00:00
Dmitry Stogov a56bb8e06e Fixed bug #47273 (Encoding bug in SoapServer->fault) 2009-08-26 14:05:48 +00:00
Guenter Knauf 7a4e20ca25 fix bug #48640: cleaned up ifdef whoes, removed duplicate code. 2009-08-26 02:16:41 +00:00
Ilia Alshanetsky ef5691ff42 Don't clober variables 2009-08-24 18:40:13 +00:00
Rafael Machado Dohms bfa792bb3c Adding tests for imagecolorallocatealpha 2009-08-24 02:50:19 +00:00
Mikko Koppanen 6b20ef8197 Fixes a memory leak in ssl streams. The context was not properly freed 2009-08-22 02:31:23 +00:00
Jani Taskinen 2d8ddcb682 - Fixed bug #49286 (php://input (php_stream_input_read) is broken) 2009-08-20 12:40:15 +00:00
Jani Taskinen af7d5f950d - WS + CS + sync 2009-08-20 12:17:32 +00:00
Jani Taskinen c935d23791 - Fixed bug #49289 (bcmath module does not compile with phpize configure). 2009-08-20 11:19:20 +00:00
andy wharmby c934b1e7c9 New basic test for md5(). Tested on Windows, Linux and Linux 64 bit 2009-08-19 08:39:33 +00:00
Stanislav Malyshev 50fa1e7a2f fix crash when unexpectedly passed by-ref parameter is modified 2009-08-18 20:51:49 +00:00
Garrett Serack 2b682228e2 - Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server) 2009-08-18 18:58:33 +00:00
Ilia Alshanetsky c3e759372e NULL the value after free 2009-08-18 12:44:32 +00:00
andy wharmby 8c84e5256b New str_replace() tests. All tested on Windows, Linux and Linux 64 2009-08-17 22:41:30 +00:00
Jani Taskinen 223a8da69d - Fix news 2009-08-17 20:14:25 +00:00
Dmitry Stogov 161dbf90ad Fixed bug #49144 (import of schema from different host transmits original authentication details) 2009-08-17 18:23:48 +00:00
Jani Taskinen 844d49f80c - Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). 2009-08-17 17:57:40 +00:00
Jani Taskinen b589d82176 - Fixed bug #49248 by fixing bug #48994 properly 2009-08-17 17:30:32 +00:00
Jani Taskinen d6439e0920 - Try disabling zlib.output_compression always for images. (zlib extension might be compiled as shared and not same time as the main PHP binary) 2009-08-17 16:54:39 +00:00
andy wharmby 09e01d4384 Make test more portable. 2009-08-17 15:54:51 +00:00
Derick Rethans f5f8a3cee2 - Updated to version 2009.12 (2009l) 2009-08-17 14:46:58 +00:00
andy wharmby b000227f0a New basic tests for uniqid(). Tested on Windows, Linux and Linux 64 bit 2009-08-17 14:22:02 +00:00
andy wharmby 78846dab86 New basic string tests - includes back-porting a few existing tests back to 5.2. All tested on Windows, Linux and Linux 64 2009-08-17 10:37:30 +00:00
Dmitry Stogov 2a6b53de4b Fixed bug #49269 (Ternary operator fails on Iterator object when used inside foreach declaration). (Etienne, Dmitry) 2009-08-17 07:40:18 +00:00
Ilia Alshanetsky 60d0e60d87 Added missing sanity checks around exif processing 2009-08-16 14:31:27 +00:00
Dmitry Stogov 85cee656e4 Fixed crash in usort() and uasort() in case user comparison function modifyes the array. 2009-08-14 06:18:47 +00:00
Ilia Alshanetsky ae38f7ad1c Back to dev 2009-08-13 12:34:56 +00:00
Ilia Alshanetsky 672cf89dea Back to RC1 for a second (still learning svn ;( ) 2009-08-13 12:33:19 +00:00
Ilia Alshanetsky 872d28d545 Back to dev 2009-08-13 12:22:12 +00:00
Ilia Alshanetsky 51b01fca74 5.2.11RC1 2009-08-13 12:17:04 +00:00
Scott MacVicar 42aa79cd97 BFN 2009-08-12 00:21:42 +00:00
Scott MacVicar ed57e50fca MFB 5.3: Fix bug #48284 (r283144) - adler32 is in the wrong order. Changed to match what zlib produces. 2009-08-12 00:18:36 +00:00
Sriram Natarajan 77e32a6371 - Simplify default flags for Sun C compiler. 2009-08-11 23:45:35 +00:00
Stanislav Malyshev e88345d268 fix potential memory issue on serialization
# When internal class uses zend_mangle_property_name it's malloc()
# so it should be freed with free()
2009-08-11 22:46:07 +00:00
Scott MacVicar 0125a3620b We should check /usr/local/include last 2009-08-11 21:40:15 +00:00
Ilia Alshanetsky fdd4a42546 Fixed typo 2009-08-11 16:11:23 +00:00
Pierre Joye a212a16419 - fixed bug #49072, feof never returns true for damaged file in zip 2009-08-11 15:12:00 +00:00
Scott MacVicar bae879486a Search /usr/include too for those wanting to use a system PCRE. 2009-08-11 12:03:29 +00:00
David Soria Parra 60a8b1f6fb Add actions for the gitclean target. 2009-08-11 02:21:09 +00:00
Rasmus Lerdorf 545b5fcd54 Tweak a few tests that failed on OSX 2009-08-10 06:53:49 +00:00
Rasmus Lerdorf a207b7ea69 Make these socket tests less Linux-specific 2009-08-09 14:50:51 +00:00
Rasmus Lerdorf 73de7b29b6 The system error here may not be "Filename too long". On OSX, for example,
it is "Invalid ioctl" in this case.
2009-08-09 14:20:54 +00:00
Rasmus Lerdorf 1c439aacf8 Skip this test on osx because ceil(-0.5) doesn't return -0 like
everywhere else because of weird optimizations.
2009-08-09 05:16:17 +00:00
Rasmus Lerdorf 5c729bb28c Restore intra-string whitespace collapsing broken in the previous change. 2009-08-08 14:39:34 +00:00
Rasmus Lerdorf a63ce91cd6 Oops, true/false are not defined on Linux. They are on OSX. 2009-08-07 17:32:31 +00:00
Rasmus Lerdorf a2b373d224 Only skip leading 0's - fixes a test I broke a while ago 2009-08-07 17:14:19 +00:00
Scott MacVicar 6d78ad0f01 Merge r286857: Change dns.h to php_dns.h, part of my dns cleanup 2009-08-06 14:07:16 +00:00
Rasmus Lerdorf bcabef3c9f More eol crap 2009-08-06 13:31:03 +00:00
Rasmus Lerdorf 2ce7143347 Fix more tests messed up by svn 2009-08-06 13:26:43 +00:00
Rasmus Lerdorf 4638a9c78e Fix test 2009-08-06 13:08:13 +00:00
Ilia Alshanetsky a358e4d0dd Make test more generic 2009-08-06 12:23:35 +00:00
Jani Taskinen ababa2eabd - Fix CS and remove extra strlen() call 2009-08-06 11:11:15 +00:00
Rasmus Lerdorf 76f8041036 The user argument cannot be NULL here - fixes 2 tests 2009-08-06 10:56:00 +00:00
Kalle Sommer Nielsen aaea1e8b58 MFH: Fixed compiler warnings in ext/date 2009-08-05 21:25:39 +00:00
andy wharmby 3b9ebac846 Basic test for is_resource() and isset() functions. tested on Windows, Linux and Linux 64 2009-08-05 16:10:46 +00:00
andy wharmby a00d5aa5bd Add new use-case to parse_str() test. Tested on Windows, Linux and Linux 64 2009-08-05 08:54:27 +00:00
andy wharmby 316d82625a Fix tests 2009-08-04 23:16:25 +00:00
Jani Taskinen caa09a360e - Add test (yes, it fails still :) 2009-08-04 12:16:40 +00:00
Jani Taskinen 07c8bb9d6c - Fixed bug #48608 (Invalid libreadline version not detected during configure) 2009-08-04 11:20:49 +00:00
Antony Dovgal 4ee2949d68 cosmetic fix 2009-08-04 09:27:15 +00:00
Antony Dovgal cebcb49215 fix memleak and possible segfault in HTTP fopen wrapper 2009-08-04 09:24:48 +00:00
Jani Taskinen 1f4ba45991 - Fix title 2009-08-04 02:55:24 +00:00
Jani Taskinen b1fbbea818 - Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII strings as option keys) 2009-08-04 02:34:04 +00:00
andy wharmby fbb3bc2b8c New basic tests for get_defined_constants(), get_loaded_extensions() and get_resource_type() functions. Tested on Windows, Linux and Linux 64 bit 2009-08-03 23:12:43 +00:00
andy wharmby cb28009c72 Add missing SKIPIF sections to tests 2009-08-03 22:40:58 +00:00
Felipe Pena 017670317f - Fixed bug #49095 (proc_get_status['exitcode'] fails on win32) 2009-08-03 19:05:56 +00:00
Jani Taskinen 329c258148 - Fixed bug #48994 (zlib.output_compression does not ouput HTTP headers when set to a string value)
# also fixes bug #35936 (ini.zlib.output-compression Documentation :)
2009-08-03 18:15:30 +00:00
Felipe Pena 748590c6ab - CS 2009-08-03 15:58:18 +00:00
Felipe Pena 1e21fd1777 - Improved. No ugly copy. (Tony) 2009-08-03 13:26:15 +00:00
Felipe Pena c46c584f97 - Re-fix stream_is_local() memory leaks 2009-08-03 13:16:24 +00:00
Jani Taskinen 28e248da9b - Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE flag) 2009-08-03 13:02:53 +00:00
Jani Taskinen 4bc219eadb - Fixed bBug #48873 (Using both --with-libedit and --with-readline cause unknown option warning)
# This isn't worth of NEWS entry, it's just cosmetic
2009-08-03 11:21:44 +00:00
Jani Taskinen f3d7bf9cf3 - These tests fail if mbstring is enabled, not because of bad libc.. 2009-08-03 10:23:23 +00:00
Uwe Schindler a525ea8c5b MFH: Fix bug #46020: With Sun Java System Web Server 7.0 on HPUX, #define HPUX 2009-08-03 10:14:20 +00:00
Antony Dovgal b691c34579 revert bogus memleak fix causing Valgrind to scream 2009-08-03 08:45:28 +00:00
Rasmus Lerdorf 7f594baaa3 Fix broken json tests in all branches 2009-08-03 04:01:57 +00:00
Rasmus Lerdorf 5624073f74 Missed a merge 2009-08-02 23:12:04 +00:00
Greg Beaver c624bfb376 add missing fetch.php 2009-08-02 19:13:43 +00:00
Greg Beaver 63a7abc493 fix Bug #43857 2009-08-02 19:11:15 +00:00
Jani Taskinen 4bf6310b15 - More and more missing svn:ignore entries. 2009-08-02 01:48:27 +00:00
Jani Taskinen b36044f633 - No ignore here 2009-08-02 01:42:40 +00:00
Jani Taskinen 5ef997b7eb - More missing svn:ignore entries 2009-08-02 01:16:41 +00:00
Felipe Pena 888669dd69 - Fixed paths 2009-08-01 23:26:02 +00:00
Felipe Pena 3135976b14 - Fixed bug #49125 (Error in dba_exists C code)
patch by: jdornan at stanford dot edu
2009-08-01 23:10:11 +00:00
Felipe Pena a4a09a00ab - Fixed ReflectionClass::getStaticProperties() to do not return the private properties from parent class;
behavior already adopted in ReflectionClass::getDefaultProperties() and ReflectionClass::getProperties().
2009-08-01 20:44:00 +00:00
Felipe Pena da73057c2a - Fixed bug #49132 (posix_times returns false without error)
patch by: phpbugs at gunnu dot us
2009-08-01 18:22:31 +00:00
Derick Rethans 3627bd185a - Added a function to print all CVs from the local scope. 2009-08-01 12:55:36 +00:00
Jani Taskinen df61b3c6eb - Fixed bug #43510 (stream_get_meta_data() does not return same mode as used in fopen) 2009-08-01 03:17:31 +00:00
Jani Taskinen 2f577607b0 - Missing svn:ignore 2009-08-01 01:32:57 +00:00
Jani Taskinen 4caca3b57d - Missing svn:ignore 2009-08-01 01:32:34 +00:00
Jani Taskinen 1679a25308 - Added test for bug #49074 2009-08-01 01:01:43 +00:00
Jani Taskinen f9e548a9e5 - Fixed bug #49074 (private class static fields can be modified by using reflection) 2009-08-01 00:48:04 +00:00
Garrett Serack bdcc7e1460 - Updated fix for bug #48911 (embed sapi misses SAPI_API)
#- Windows didn't need SAPI_API
2009-07-30 20:20:56 +00:00
Jani Taskinen 24e68ba62c - Fixed compile failure with older openssl libs (< 0.9.8), fixes bug #49012 2009-07-30 11:32:08 +00:00
Kalle Sommer Nielsen 14e9fd36cd Test case for bug #42434 2009-07-30 03:54:27 +00:00
Felipe Pena 628d1d59d7 - Fixed memleak in stream_is_local() 2009-07-29 19:09:17 +00:00
Johannes Schlüter d07fcfd636 Remove .project files (doesn't exist in trunk) 2009-07-29 13:51:52 +00:00
Ilia Alshanetsky 334d154acc Fixed bug #45141 (setcookie will output expires years of >4 digits). 2009-07-29 13:44:16 +00:00
Jani Taskinen b2449e38f2 - fuck bom 2009-07-29 12:50:19 +00:00
Greg Beaver 45194181d2 sync run-tests.php with revision 286499 changes making php 6 tests with EXPECTF that can have arbitrary binary data in output work 2009-07-29 10:06:55 +00:00
Jani Taskinen 5024e00b78 - Fix news 2009-07-29 09:10:52 +00:00
Moriyoshi Koizumi 0754517cb2 * Fix bug #48645 (mb_convert_encoding() doesn't understand hexadecimal html-entities) 2009-07-29 04:44:08 +00:00
Hannes Magnusson 650ece0b75 MFH: Fixed bug #44144 & add test 2009-07-28 22:25:31 +00:00
Jani Taskinen 18d7a1b461 - Fixed bug #48911 (embed sapi misses SAPI_API) 2009-07-28 21:07:43 +00:00
Kalle Sommer Nielsen 420c0ccda9 Fixed bug #42434 (ImageLine w/ antialias = 1px shorter)
- patch by wojjie at gmail dot com
2009-07-28 20:35:06 +00:00
Sriram Natarajan 501b9f7894 - 48182 ssl handshake fails during asynchronous socket connection 2009-07-28 19:28:08 +00:00
Jani Taskinen e4e8e7b46a - Skip some tests in 32bit systems, add cleanups where missing 2009-07-28 19:16:02 +00:00
Derick Rethans 1f9610b81d - Updated to version 2009.11 (2009k) 2009-07-28 15:25:16 +00:00
Rasmus Lerdorf 0b311264b8 Get rid of this platform-specific test 2009-07-28 14:56:08 +00:00
Antony Dovgal 64ee5ebffb configure dependency has to be optional as well 2009-07-28 08:59:08 +00:00
Antony Dovgal c380c743fc fix segfault in session/tests/031.phpt by adding optional extension
dependency (php_hash_hashtable has to be initialized when setting
session.hash_function)
2009-07-28 08:54:23 +00:00
Rasmus Lerdorf 48ce6230b0 The version check was completely bogus in this test 2009-07-27 23:37:40 +00:00
Rasmus Lerdorf 007f0fd43c We don't support . as a delimiter here in PHP 5.2. Support was added in 5.3 2009-07-27 23:08:23 +00:00
Takeshi Abe 2147f3e1f5 MFB: added test for #43073 2009-07-27 22:12:35 +00:00
Takeshi Abe 93ceb2ada5 MFH: fixed #48732 (TTF Bounding box wrong for letters below baseline) and #48801 (Problem with imagettfbbox) 2009-07-27 15:11:46 +00:00
Felipe Pena 91676429a5 - Fix ZTS build 2009-07-26 23:44:59 +00:00
Jani Taskinen 802daf8f7c - Regenerated 2009-07-26 23:22:27 +00:00
Jani Taskinen acbfafef3c - Fixed bug #49064 (--enable-session=shared does not work: undefined symbol:
php_url_scanner_reset_vars). (Jani)

# Note: This does not exist in PHP_5_2. Merged there as well to keep these files synced.
2009-07-26 23:20:34 +00:00
Jani Taskinen f67eeca1ef - Removed unused code (replaced long time ago by url_scanner_ex.* 2009-07-26 22:59:46 +00:00
Rasmus Lerdorf 540bab3e67 More mime-type cleanups 2009-07-26 21:44:54 +00:00
Ilia Alshanetsky 72550b4f0a Fixed bug #49026 (proc_open() can bypass safe_mode_protected_env_vars
restrictions).
2009-07-26 15:14:18 +00:00
Rasmus Lerdorf 459b3bfa6a The test for bug #46739 doesn't actually need the remote
responder, so get rid of the skipif in PHP 5, and it was
broken in PHP 6 because the keys in the curl_info array 
were not unicode.  All internally-generated arrays should
have unicode keys.
2009-07-26 02:12:38 +00:00
Jani Taskinen 4abb6878fd - Fix tests to be more comptatible AND to test what they are supposed to test 2009-07-25 22:20:18 +00:00
Felipe Pena 3bb252a461 - Opss, fix the fix... 2009-07-25 21:56:31 +00:00
Felipe Pena 0b75925a6f - Fix test 2009-07-25 21:52:33 +00:00
Rasmus Lerdorf d1b5964a6e Fix dumb typo in the skipif 2009-07-25 21:37:04 +00:00
Jani Taskinen e30acaa428 - Fix this again :) 2009-07-25 21:07:02 +00:00
Jani Taskinen ee9e684705 - Add missing EXPERIMENTAL note (this thing REALLY is experimental at best..) 2009-07-25 20:58:51 +00:00
Jani Taskinen 6e1f000090 - Fixed bug #48637 ("file" wrapper is overwritten when using --with-curlwrappers)
# Also fixes bug #48603, basically same issue.
2009-07-25 20:44:19 +00:00
Felipe Pena 4b9b4ad0dd - Making Valgrind happy 2009-07-25 20:39:01 +00:00
Derick Rethans 5e0d5f2fa0 - MF53: Added - to the list of "unsafe" characters so that the pecl dir can
have the - character in the name.
2009-07-25 15:51:02 +00:00
Derick Rethans e5bbeae477 - Updated to version 2009.11 (2009k) 2009-07-25 15:14:33 +00:00
Jani Taskinen a231624c60 - Fix bad environment usage 2009-07-25 14:52:52 +00:00
Jani Taskinen 7c2896d60c - Fix test when responder is something like lighttpd 2009-07-25 14:49:17 +00:00
Jani Taskinen 728069b96b - Fix test 2009-07-25 14:20:38 +00:00
Jani Taskinen 89de347f92 - Merge from PHP_5_3:
r280810 | kalle: Fixed compiler warnings
r276286 | iliaa: Fixed bug #47477 (php_curl_stream_read() unnecessarily sleeps 15 secs under heavy load)
2009-07-25 13:09:03 +00:00
Jani Taskinen 1941fb2bf1 - Fixed bug #49052 (context option headers freed too early when using --with-curlwrappers) 2009-07-25 13:00:25 +00:00
Jani Taskinen fb3b83b85a - Fix test 2009-07-25 00:35:25 +00:00
Moriyoshi Koizumi 3e3099f0d0 - MFH 2009-07-24 23:50:12 +00:00
Jani Taskinen c912e1c07b - Fix test 2009-07-24 19:51:55 +00:00
Rafael Machado Dohms 918889c957 Adding tests for imagesetthickness, basic and errors for both params, and complementing imagetruecolortopalette with out of bound params 2009-07-24 03:06:05 +00:00
Jani Taskinen 1cee22e83f - Fixed tests to be more portable 2009-07-23 19:06:56 +00:00
Jani Taskinen ff9403f4c0 - Allow using huge values for chunklen in this branch too 2009-07-23 17:39:21 +00:00
Jani Taskinen bf7764ce57 - Fix test 2009-07-23 16:24:24 +00:00
Jani Taskinen ed14e50435 - fix test 2009-07-23 15:16:08 +00:00
Jani Taskinen eddb79e0ab - Fixed bug #48802 (printf() returns incorrect outputted length) 2009-07-23 14:54:04 +00:00
Jani Taskinen e02a2ac8e8 - Fixed bug #49032 (SplFileObject::fscanf() variables passed by reference) 2009-07-23 14:42:46 +00:00
Patrick Allaert 6dacd1d269 MFH: The exact error message might differ (it's "Not owner" on Solaris) (r265951) 2009-07-22 12:20:56 +00:00
Jani Taskinen ad6945538c - PHP_5_2 branch does not have these macros 2009-07-21 23:06:18 +00:00
Jani Taskinen 913ca7786c - Fix badly applied patch (bug #48774) 2009-07-21 22:57:08 +00:00
Rasmus Lerdorf 954bb8e35e Fix bug #49003 by tweaking the fix to bug #44929 slightly.
A 0 followed by any punctuation is now significant instead
of just 0's in front of a period.
2009-07-21 21:15:48 +00:00
Sriram Natarajan 7f87b7e15c - Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()). 2009-07-21 20:32:32 +00:00
Ilia Alshanetsky 3050decf1e Fixed bug #48962 (cURL does not upload files with specified filename). 2009-07-21 15:56:08 +00:00
Zoe Slattery 0dab567bcc Remove empty sections. Fix bad use of --SKIP-- 2009-07-21 14:02:24 +00:00
Jani Taskinen 854ddd8c6e - There is only one Makefile that needs removing 2009-07-21 13:57:33 +00:00
Jani Taskinen e8ca212c9d - Fixed problem with vcsclean which caused it not to really clean whole tree 2009-07-21 12:01:26 +00:00
Johannes Schlüter 1d1cafd4cc CVS->SVN 2009-07-20 14:34:09 +00:00
Jani Taskinen 0158a15046 Fixed bug #48929 (Double \r\n after HTTP headers when "header" context option is an array) 2009-07-20 10:54:37 +00:00
Jani Taskinen 12a666b7e0 - Removed unused parts 2009-07-20 10:51:40 +00:00
Rafael Machado Dohms 8d3123a0a1 Removing deprecated test replaced by individual tests for imageistruecolor and imagetruecolortopalette 2009-07-20 03:48:55 +00:00
Rafael Machado Dohms 563b6ba594 Separating and complementing imageistruecolor and imagetruecolortopalette tests 2009-07-20 03:47:29 +00:00
Felipe Pena c16d5d946c - Fixed bug #48057 (Only the date fields of the first row are fetched, others are empty)
patch by: info at programmiernutte dot net
2009-07-20 00:17:24 +00:00
Felipe Pena 22bd02b4b8 - Fixed bug #48980 (Crash when compiling with pdo_firebird) 2009-07-19 23:33:50 +00:00
Felipe Pena 6346c75d15 - Revert my mistake 2009-07-19 22:46:03 +00:00
Rafael Machado Dohms d5045b3697 Adjusting tests to use EXPECTF (faster testing) and adjusting 5_2 version to lack of parameter validation 2009-07-19 22:16:35 +00:00
Felipe Pena 790b65617a - Fixed module check (Related to bug #48785) 2009-07-19 20:53:26 +00:00
Felipe Pena 995950facb - Fixed bug #48773 (Incorrect error when setting PDO::ATTR_STATEMENT_CLASS with ctor_args)
[HEAD only]
2009-07-19 18:55:31 +00:00
Pierre Joye d4afadbfbe - #49763 entry (and test commit in multiple branches :) 2009-07-19 17:02:03 +00:00
Christopher Jones 964baec5e6 MFH: Bug #48722 (Update OCI8 --enable-sigchild warning) 2009-07-19 16:28:15 +00:00
Christopher Jones 757a492651 make it easier for maintainers to set un/pw in environments that don't pass shell variables 2009-07-19 16:21:35 +00:00
Pierre Joye 1d16a525a5 - Fix #48763, create corrupt archive 2009-07-19 15:31:05 +00:00
Pierre Joye 19059ef91e - MF53 2009-07-19 15:21:13 +00:00
Felipe Pena e03540f80e - Removed unnecessary strlen() call and if statement. 2009-07-19 14:36:16 +00:00
Felipe Pena d7db4660ee - Tests related to bug #48770 2009-07-19 03:25:49 +00:00
Rafael Machado Dohms 874e9e0006 Adding tests for imagecreatetruecolor for PHP_5_2 and trunk 2009-07-19 01:44:19 +00:00
Pierre Joye 86659d4de0 - let try to be smart, read the bug report.... 2009-07-18 17:08:11 +00:00
Zoe Slattery a809e1429e Adding explanation 2009-07-18 16:53:54 +00:00
Zoe Slattery b718e008f5 removing empty XFAIL sections 2009-07-18 16:41:16 +00:00
Zoe Slattery 920290d0dc Removing unnecessary SKIPIF sections 2009-07-18 13:47:08 +00:00
Rasmus Lerdorf d13a8c30df Fix TTF Files 2009-07-18 03:18:36 +00:00
andy wharmby b2f934d74b New cURL tests. Tested on Windows, Linux and Linux 64 bit 2009-07-17 20:46:30 +00:00
andy wharmby 6cb2f1cabc Fix cURL tests 2009-07-17 20:44:50 +00:00
Alexey Zakhlestin 9ec93445a8 MFB: fixed tests. money_format() is implemented in underlying system, not in php. So, we shouldn't test for actual values returned. They are different between systems 2009-07-17 16:04:06 +00:00
Felipe Pena c9b0466df1 - Fix test 2009-07-17 14:04:51 +00:00
Jani Taskinen fe7cc3b1cf - Add missing file exts 2009-07-17 12:31:58 +00:00
Jani Taskinen 6b46e3b7b9 - Fixed bug #48947 (vcsclean does not remove all created files) 2009-07-17 12:14:21 +00:00
Jani Taskinen b7e602d74c CS 2009-07-17 11:49:50 +00:00
Jani Taskinen 5278a956f0 - Fixed bug #47481 (natcasesort() does not sort extended ASCII characters correctly) 2009-07-17 11:13:51 +00:00
Rasmus Lerdorf 7705411a87 Multi-branch test commit to see if email notifications are working 2009-07-17 04:26:33 +00:00
Stanislav Malyshev ff9a0a7811 fix memory leak 2009-07-17 00:57:28 +00:00
Felipe Pena 3e5c792a6e - MFH: Fixed bug #48762 (IPv6 address filter still rejects valid address) 2009-07-16 23:32:16 +00:00
Jani Taskinen 4e48207626 - Not supposed to be here.. 2009-07-16 16:09:18 +00:00
Jani Taskinen ae424dbb83 MFH 2009-07-16 12:19:02 +00:00
Gwynne Raskind 2c3bd3bc30 one more attempt at ridding us of some of those annoying mime types 2009-07-16 08:10:50 +00:00
Gwynne Raskind e9b85ae00c MFH: dropped some more mime types, svnclean -> clean for multiple VCS 2009-07-16 04:54:26 +00:00
Felipe Pena 86101f6162 - MFH: Removed trailing zeros on double to string conversion (noticed on #48924) 2009-07-16 01:00:22 +00:00
Stanislav Malyshev ffe840983b fix ini_restore problem 2009-07-16 00:03:18 +00:00
Stanislav Malyshev 05687be885 fix freed mem reference 2009-07-15 23:57:10 +00:00
Rasmus Lerdorf 13878ae91e Fix the buffer handling here 2009-07-15 23:50:59 +00:00
Rasmus Lerdorf 4bf10270c7 Limit db connection strings to 255 chars here - I don't trust the underlying libs 2009-07-15 19:16:58 +00:00
Pierre Joye 4b5fddfdc4 - cvs > svn 2009-07-15 17:09:19 +00:00
Pierre Joye 07530e05c4 - cvs > svn 2009-07-15 16:51:35 +00:00
Alexey Zakhlestin 53de77421d fix tests corrupted by svn's eol-style=native 2009-07-15 13:55:39 +00:00
Alexey Zakhlestin 187336aaff MFH: fix broken test 2009-07-15 10:17:04 +00:00
andy wharmby 795a087448 Fix test 2009-07-15 08:19:05 +00:00
Felipe Pena b723416322 - MFH: Fixed bug #48913 (Too long error code strings in pdo_odbc driver) 2009-07-15 02:35:43 +00:00
Gwynne Raskind 722657e641 kill bad mime types 2009-07-14 21:52:43 +00:00
Gwynne Raskind a20f01aef7 MFH: CVS->SVN 2009-07-14 21:49:36 +00:00
Stanislav Malyshev 5ae716a724 fix build 2009-07-14 18:55:06 +00:00
David Soria Parra d0a312e573 MFH: cvs->svn 2009-07-14 09:57:09 +00:00
Pierre Joye 2ad2cb4054 - remove app/js mime 2009-07-13 22:01:21 +00:00
Rasmus Lerdorf 7a2141e48a cvs->svn 2009-07-13 19:15:58 +00:00
Rasmus Lerdorf 2ec070bb56 cvs->svn 2009-07-13 17:17:19 +00:00
Pierre Joye 06eb625f50 - rename to svn 2009-07-13 16:09:39 +00:00
Pierre Joye 47d3c72622 - rename to svn 2009-07-13 16:09:21 +00:00
Pierre Joye ccfabf9644 - cvs to svn changes 2009-07-13 16:01:40 +00:00
David Soria Parra ed20cc0d63 MFB: remove ZendEngine* detection, we always have Zend now (svn) 2009-07-13 06:42:59 +00:00
Gwynne Raskind 74190c4d5e MFB: cvsclean -> svnclean 2009-07-12 22:06:53 +00:00
Ilia Alshanetsky 1e0340a447 MFB: Fixed a possible crash inside OnUpdateErrorLog() when restoring an empty value 2009-07-12 16:42:16 +00:00
Rasmus Lerdorf 79a8116f02 Test commit - but pseudo useful 2009-07-11 04:14:29 +00:00
David Soria Parra 6b560284dd MFH: Get rid of PHP 4 related buildconf and moving around directories. As we switched to svn ZE2 is in Zend by default. 2009-07-11 02:47:38 +00:00
andy wharmby fbe70a47ea Fix test 2009-07-09 11:45:36 +00:00
Ilia Alshanetsky 6295278dfc BFN 2009-07-08 03:10:32 +00:00
Ilia Alshanetsky c79ec97b29 MFB: Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into
symlinked directories).
2009-07-08 03:08:03 +00:00
David Soria Parra 36d03e10a4 MFH: Reset TZ environment variable. Some tests assume that it's not set. 2009-07-07 23:05:33 +00:00
Jani Taskinen 9eafbf0998 MFH:- Fixed bug #48247 (Infinite loop and possible crash during startup with errors) 2009-07-07 16:43:35 +00:00
Pierre Joye 910bd85c7a - #48116 2009-07-07 15:15:46 +00:00
Pierre Joye 42df1c901d - MF53: #48116, fix build with openssl 1.0 2009-07-07 15:14:03 +00:00
Jani Taskinen 66e3ea2c17 F*ckin bom 2009-07-07 12:19:42 +00:00
Pierre Joye 305f104687 - #45905 2009-07-07 11:07:50 +00:00
Pierre Joye 307bd5a23b - MF53: #45905, imagefilledrectangle() clipping error 2009-07-07 11:06:21 +00:00
Ilia Alshanetsky 043a282d1b Fixed bug #48808 (FILTER_VALIDATE_EMAIL allows some invalid e-mail syntaxes) 2009-07-07 00:44:07 +00:00
andy wharmby c6116d0ca4 Fix test 2009-07-06 19:34:56 +00:00
Jani Taskinen 0496b37bf0 - Added missing file 2009-07-06 14:10:38 +00:00
Ilia Alshanetsky 74d7af3194 Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain
components).
2009-07-05 16:07:24 +00:00
Zoe Slattery 86d682ca7f fix test 2009-07-05 14:46:53 +00:00
Felipe Pena 82f9a77f57 - New tests (DutchUG testfest) 2009-07-03 22:21:09 +00:00
Antony Dovgal ef04c97e2a merge from 5_3 2009-07-03 14:03:17 +00:00
Patrick Allaert ad07fa214e MFH: Tests for ext/ldap from PHPBelgium TestFest 2009-07-03 10:57:04 +00:00
Ilia Alshanetsky 8062b50a07 Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on
files that have been opened with r+).
2009-07-02 13:41:29 +00:00
Felipe Pena 979ed8e3f1 - MFH: New tests (NorwayUG testfest) 2009-07-02 00:07:08 +00:00
Kalle Sommer Nielsen e493bbae1d BFN #45280 2009-07-01 18:46:53 +00:00
Kalle Sommer Nielsen d972b5de5b Fixed #45280 (Reflection of instantiated COM classes causes PHP to crash) (Paul Richards, Kalle) 2009-07-01 18:45:32 +00:00
Felipe Pena c6f719b915 - Fix test 2009-07-01 12:20:08 +00:00
Felipe Pena 984737ae63 - New tests 2009-07-01 02:36:28 +00:00
Derick Rethans 25e8f839d5 - MFH: Fixed bug #47351 (Memory leak in DateTime). 2009-06-30 16:18:34 +00:00
Ilia Alshanetsky 40fff3e335 WS 2009-06-29 12:40:46 +00:00
andy wharmby 724c464ad0 Basic test for max() on 64 bit platforms. Tested on Linux 64 bit 2009-06-29 07:52:25 +00:00
andy wharmby ceee572c0b Fix tests 2009-06-29 07:45:12 +00:00
andy wharmby 9d9e57236d Basic tests for sleep() and usleep(). Tested on Windows, Linux and Linux 64 bit 2009-06-29 07:31:14 +00:00
Felipe Pena 9c602f1e6b - MFH: Fixed bug #48709 (metaphone and 'wh') 2009-06-28 18:44:28 +00:00
Jani Taskinen 9729792378 - Typo, removed BOM (this file was supposed to be just ascii..right? :) 2009-06-28 15:40:00 +00:00
Ilia Alshanetsky 6c2782c92b FN 2009-06-28 14:15:32 +00:00
Pierre Joye fdd7bbac0f - MFH: fix regression introduced by the fix for #48518 (Ilia, Rasmus) 2009-06-28 10:00:28 +00:00
Pierre Joye 0f79478716 - calloc must actually clearing the requested size (Andrei) 2009-06-28 09:47:42 +00:00
Felipe Pena ec1d2c8dc9 - MFH: Fixed bug #48539 (pdo_dblib fails to connect, throws empty PDOException "SQLSTATE[] (null)") 2009-06-28 02:09:50 +00:00
Felipe Pena ef600a05a5 - MFH: Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted) 2009-06-28 01:16:36 +00:00
Rob Richards c4e0f38aa7 MFH: add libxml_disable_entity_loader function 2009-06-26 20:27:44 +00:00
Zoe Slattery 5c3c95d224 fix skipif 2009-06-25 14:49:47 +00:00
Zoe Slattery c615df97f3 fix skipif 2009-06-25 14:42:38 +00:00
Zoe Slattery 44807c9bbe fix skipif 2009-06-25 12:37:45 +00:00
Ilia Alshanetsky f01baf3965 Handle instances where TMPDIR = "" 2009-06-25 01:35:05 +00:00
Scott MacVicar bcf5793b56 MFH Fix bug #48679 - Crash in SQLite with count on an unbuffered query set 2009-06-25 00:07:20 +00:00
Ilia Alshanetsky 13cd2683cc Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using
TMPDIR).
2009-06-24 12:21:20 +00:00
Jani Taskinen 8bb00a20d4 MFH:- Fixed bug #48661 (phpize broken with non-bash shells) 2009-06-24 07:43:18 +00:00
andy wharmby 960ac2b4b0 Fix test 2009-06-23 23:00:57 +00:00
andy wharmby 30cadad903 New and fixed html tests. Tested in Windows, Linux and Linux 64. 2009-06-23 22:45:33 +00:00
andy wharmby 4a6df1caf8 New basic parse_str() tests. Tested on Windows,Linux and Lnux 64 bit. Some tests fail on PHP 6 (tagged with XFAIL) due to bug 48658 2009-06-23 22:39:46 +00:00
Ilia Alshanetsky 4482bfd2e4 Fixed build 2009-06-23 12:43:10 +00:00
Hannes Magnusson 025891e50f MFH: fix arginfo for libxml_use_internal_errors() 2009-06-23 12:38:32 +00:00
Kalle Sommer Nielsen 5ff316f1d6 Whops, nobody saw this :) 2009-06-23 07:09:19 +00:00
Kalle Sommer Nielsen feef90243a BFN 2009-06-23 01:02:03 +00:00
Pierre Joye 5db5d77cdb - news for #48619 2009-06-22 20:43:24 +00:00
Pierre Joye db4411e768 - MF53: #48619, imap_search ALL segfaults 2009-06-22 20:42:04 +00:00
Stanislav Malyshev 34b0f569e1 fix shared build on Windows 2009-06-22 18:41:13 +00:00
Kalle Sommer Nielsen 3b4eb71a05 Should have been in previous commit 2009-06-22 15:52:59 +00:00
Kalle Sommer Nielsen 030aea969b MFH: Use correct data types here, and gdImageSaveAlpha for the alpha flag 2009-06-22 15:51:12 +00:00
Takeshi Abe c7c937fb9b MFH: fixed bug #48555 (ImageFTBBox() differs from previous versions for texts with new lines) 2009-06-22 15:50:18 +00:00
Ilia Alshanetsky 5ee03b46d2 Fixed bug #48636 (Error compiling of ext/date on netware). 2009-06-22 13:42:29 +00:00
Felipe Pena 01c9097c74 - Fixed bug #48629 (get_defined_constants() ignores categorize parameter) 2009-06-22 00:03:24 +00:00
Scott MacVicar 74de9b7c6f BFN 2009-06-21 22:33:48 +00:00
Scott MacVicar 49638f0f8f MFH Specific test for bug #48276 2009-06-21 22:32:19 +00:00
Scott MacVicar 624930c22f MFH Fix bug #48276 - year is a long long so we need %lld so big endian systems print the correct value. 2009-06-21 22:19:19 +00:00
andy wharmby f558744785 New lang tests. 2009-06-21 17:42:16 +00:00
Johannes Schlüter 564ea0fb1c MFH: It's 2009 2009-06-21 16:45:24 +00:00
Felipe Pena 09b3411803 - MFH: old strlen cleanup 2009-06-20 18:45:18 +00:00
Kalle Sommer Nielsen b77d833eaf MFH: Fixed arginfo for array_map, patch by Matthew Fonda <matthewfonda@gmail.com> 2009-06-20 06:07:46 +00:00
Kalle Sommer Nielsen c174177a50 MFH: Fix memleak 2009-06-19 22:15:44 +00:00
andy wharmby 6ae535aaf8 Fix test; remove spurious code 2009-06-18 21:53:18 +00:00
andy wharmby c1412ea367 Basic tests for strftime(). Tested on Windows (all tests skip), Linux and Liinux 64 bit 2009-06-18 21:14:16 +00:00
andy wharmby edd936517a Backport ob test to php 5.2 and 53. 2009-06-18 21:03:32 +00:00
Derick Rethans 9a29989bfd - Updated to version 2009.10 (2009j) 2009-06-18 09:03:02 +00:00
Zoe Slattery 01a2453496 Tests from Berlin test fest 2009-06-18 07:31:10 +00:00
andy wharmby 57e2723ce9 New test for standard object compare handler. Tested on Windows, Linux and Linux 64 2009-06-17 19:15:20 +00:00
andy wharmby 38db2b869c New foreach tests. Tested on Windows, Linux and Linux 64 bit. 2009-06-17 19:07:19 +00:00
Ilia Alshanetsky 3c56aa38e8 Back to dev 2009-06-17 12:31:58 +00:00
Ilia Alshanetsky e1583cd82e 5.2.10 2009-06-17 12:22:41 +00:00
Robin Fernandes 282eab49fb Additional class related tests. 2009-06-17 10:38:23 +00:00
Hannes Magnusson 191307c968 fix skipif 2009-06-17 10:17:52 +00:00
Rasmus Lerdorf c572a7fd8b Need the gcc version check here too 2009-06-17 08:57:04 +00:00
Felipe Pena d509bf07bd - Fixed tests 2009-06-16 19:50:38 +00:00
andy wharmby eaf01568a1 New strcoll error test. Tested on Windows, Linux and Linux 64. 2009-06-16 19:39:40 +00:00
Rasmus Lerdorf 96ea9c6e5b Another tweak to make 5.2 compile on gcc2 2009-06-16 16:09:04 +00:00
andy wharmby 2aa9a15641 Fix typo in test 2009-06-16 11:37:14 +00:00
andy wharmby 3b92265bc3 New class related tests. Tested on Windows, Linux and Linux 64. Tests written by Iain Lewis 2009-06-16 08:59:55 +00:00
Felipe Pena ee780e60b8 - MFH: Fixed bug #48562 (Reference recursion causes segfault when used in wddx_serialize_vars()) 2009-06-16 02:59:10 +00:00
Pierre Joye 30b25d0229 - #48441 and encoding 2009-06-15 22:11:47 +00:00
Felipe Pena 273bda7b21 - Drop unused code 2009-06-15 17:55:11 +00:00
andy wharmby 7f492c7f66 New test for bitwise operators. Tested on Linux 64 bit 2009-06-15 17:38:55 +00:00
Felipe Pena 51781931e2 - MFH: Fixed bug #48557 (Numeric string keys in Apache Hashmaps are not cast to integers) patch by David Zülke <david.zuelke at bitextender.com> 2009-06-15 17:36:00 +00:00
Patrick Allaert 13594f8a98 MFH: Fixing #48441 (ldap_search() with sizelimit/timelimit/deref options makes those options persistent) 2009-06-15 15:18:48 +00:00
Patrick Allaert 08c7d57d73 MFH: Refactoring that will help fixing #48441 2009-06-15 15:04:31 +00:00
Ilia Alshanetsky c570bed1da MFB: Simplify original fix for bug #33475 2009-06-15 12:38:11 +00:00
andy wharmby 04961ad0c0 New POSIX extension tests from Berlin UG TestFest 2009. 2009-06-15 12:14:59 +00:00
andy wharmby 7012611307 Backport ob test to php 5.2 and 53. 2009-06-14 16:47:12 +00:00
andy wharmby 5cd01fa48b New foreach tests. Tested on Windows, Linux and Linux 64 bit. 2009-06-14 14:17:48 +00:00
andy wharmby e4ba76cdec Basic tests for function_exists() and get_defined_functions(). Tested on Windows, Linux and Linux 64 bit. 2009-06-14 13:49:19 +00:00
andy wharmby 9e6779cfac New json extension tests. Tested on Windows, Linux and Linux 64 bit. 2009-06-14 12:08:32 +00:00
Pierre Joye 96271ff8fb - MF53: fix build (void alarm) 2009-06-14 10:05:11 +00:00
Greg Beaver aac2b9464d fix missing erealloc in fix for bug #40091, spl_autoload_register of more than 1 copy of the same method in different objects 2009-06-13 17:35:37 +00:00
andy wharmby 946c404c5d New iconv extension tests. Tested on Windows, Linux and Linux 64 bit. 2009-06-13 12:17:46 +00:00
Felipe Pena a2e4ef3ba4 - MFH some changes (from last fix on 5.3+)
- Constified method_name arg in zend_get_user_call_function()
2009-06-12 21:33:46 +00:00
Felipe Pena c34ba188cc - MFH: Fixed bug #48514 (cURL extension uses same resource name for simple and multi APIs) 2009-06-12 20:50:58 +00:00
andy wharmby f071936f47 New iconv extension tests. Tested on Windows, Linux and Linux 64 bit. 2009-06-12 18:57:12 +00:00
andy wharmby 8e2850fe3c New iconv extension tests. Tested on Windows, Linux and Linux 64 bit 2009-06-12 17:16:11 +00:00
andy wharmby 4a1ae192a6 Delete duplicate test 2009-06-11 23:04:37 +00:00
andy wharmby 1c4a6d3f32 New intval() tests. Tested on Windows, Linux and linux 64 2009-06-11 22:26:57 +00:00
andy wharmby 3f1bdda498 New 64 bit math tests. Tested on Windows, Linux and Linux 64 bit. Tests authored by Dave Kelsey 2009-06-11 21:17:10 +00:00
andy wharmby aa152b1c50 Add/Fix SKIPIF sections of cURL tests 2009-06-11 21:11:23 +00:00
andy wharmby 32c8f50ea9 New POISX tests. Tested on Windows (all test SKIP), Linux and Linux 64 2009-06-11 12:30:57 +00:00
Ilia Alshanetsky e933031ccb Back to dev 2009-06-11 12:13:55 +00:00
Ilia Alshanetsky 344a9b2c7e RC2 not final 2009-06-11 12:12:43 +00:00
Ilia Alshanetsky 823224ef8d 5.2.10RC2 2009-06-11 12:10:43 +00:00
Antony Dovgal 6b1bd0d0dc MFH: fix bug #48518 (curl crashes when writing into invalid file handle) 2009-06-11 09:49:57 +00:00
Felipe Pena 838402a1bc - MFH: Fix the fix (Bug #46973 - IPv6 address filter rejects valid address) 2009-06-10 19:05:49 +00:00
Antony Dovgal d4d49f4f12 MFH: fix arginfo for curl_multi_info_read() 2009-06-10 11:10:19 +00:00
andy wharmby de3f385e5c Fix test - remove bogus variation 2009-06-09 20:18:28 +00:00
Pierre Joye 12ab20c4fe - fix NEWS 2009-06-09 14:04:28 +00:00
David Soria Parra c52581d95e Fix bug #47042 (cgi sapi is incorrectly removing the SCRIPT_FILENAME for non apache).
The fix was provided by Sriram Natarajan.
2009-06-09 13:29:39 +00:00
Ilia Alshanetsky 8d699be646 TZ update news 2009-06-09 12:16:31 +00:00
Scott MacVicar 2229ab084c BFN 2009-06-09 01:09:28 +00:00
Scott MacVicar f250ef7824 Add test 2009-06-09 01:04:35 +00:00
Scott MacVicar 813dd91af8 MFH #46019 - Memory leak when Mysqli::init() is called multiple times. 2009-06-09 01:00:47 +00:00
Scott MacVicar ebce70c20e BFN 2009-06-09 00:43:04 +00:00
Scott MacVicar 17dc898a72 MFH fix bug #44214: crash with preg_replace_callback and global variables 2009-06-08 21:52:08 +00:00
Pierre Joye a48b65d6f5 - typo 2009-06-08 21:17:12 +00:00
Derick Rethans 3c624f108e - Updated to version 2009.9 (2009i) 2009-06-08 13:53:45 +00:00
Ilia Alshanetsky 71b075062b Re-apply patch with fixed build 2009-06-08 13:34:45 +00:00
Antony Dovgal 8ab86d944a fix build, revert faulty patch 2009-06-08 13:09:30 +00:00
Robert Nicholson 14620596ab New tests for operators. These tests were auto generated to verify correctness for a number of significant values. The work was done by Dave Kelsey. 2009-06-08 12:02:57 +00:00
Jani Taskinen 135f4ebc10 fix news 2009-06-08 10:39:25 +00:00
Pierre Joye 18ecb768d0 - #48469 2009-06-08 08:39:25 +00:00
Ilia Alshanetsky 9066f91b01 BFN 2009-06-08 01:26:53 +00:00
Ilia Alshanetsky a747855425 MFB: Fixed bug #44827 (define() is missing error checks for class constants) 2009-06-08 01:26:47 +00:00
Patrick Allaert 0ab4f57c99 MFH: Removed credit 2009-06-07 21:27:42 +00:00
Robert Nicholson 9818b12488 New tests for foreach loops. These were written by another member of the Projectzero team. 2009-06-07 21:05:10 +00:00
Matt Wilmas dd4b27e943 MFH: Fixed bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value)
Also simplified related array_push() test
2009-06-07 19:28:33 +00:00
Patrick Allaert 6555a5a93e MFH: Fixed bug #48469 (ldap_get_entries() memory leaks on empty search results) 2009-06-07 13:14:30 +00:00
Rasmus Lerdorf 53a63b82d4 Make this happy on gcc2 2009-06-05 22:34:30 +00:00
Rasmus Lerdorf 077ff24ef9 We don't have these in gcc2 2009-06-05 22:24:53 +00:00
Arnaud Le Blanc c3e1afc2a3 better fix for #48409 , #48428 , #48228 2009-06-05 11:21:47 +00:00
Andrei Zmievski 6a05922020 Fix invalid test against addr6 result. 2009-06-04 18:17:28 +00:00
Jani Taskinen 3999ac15b4 MFH:- Fixed bug #48419 (non-portable STDIN fileno in cgi_main.c)
# This doesn't really fix it since it's some weird Windows thing but this
# does make this code slightly more portable :)
2009-06-04 11:53:38 +00:00
Felipe Pena 3b43d3002b - Fixed tests 2009-06-04 01:16:58 +00:00
Ilia Alshanetsky 3e79cbe9b1 MFB: Fixed bug #46386 (Digest authentication with SOAP module fails against
MSSQL SOAP services)
2009-06-03 12:41:46 +00:00
Zoe Slattery ba836422c6 Commiting testfest tests from tek 2009-06-03 12:31:05 +00:00
Kalle Sommer Nielsen 09ac5ebe7f Fixed #48448 (Compile failure under IRIX 6.5.30 building cast.c)
# Only in this branch, looks like a missing merge compared to PHP_5_3/HEAD
2009-06-03 08:59:19 +00:00
Jani Taskinen ff6862b7e1 bfn 2009-06-02 19:55:07 +00:00
Jani Taskinen f68866c487 MFH:- Fixed bug #48456 (CPPFLAGS not restored properly in phpize.m4) 2009-06-02 19:54:22 +00:00
Jani Taskinen bfebb9c6aa fix test 2009-06-02 08:03:35 +00:00
Arnaud Le Blanc 1493336708 MFH: New tests
# These tests were failing on different configurations, so adding them
# all to get more chances of seeing one failing in case of problem.
2009-06-01 16:10:47 +00:00
Arnaud Le Blanc 687f673bb9 MFH: better fix for #48409 , #48428 , #48228 2009-06-01 15:08:00 +00:00
Antony Dovgal 00a461a989 fix ZTS build 2009-06-01 14:03:24 +00:00
Ilia Alshanetsky 8e7fa70fd5 Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values). 2009-06-01 13:10:57 +00:00
Zoe Slattery d033f6904a Engine execution order tests 2009-06-01 13:01:27 +00:00
Zoe Slattery e69b4a743e Fixes to work on Windows as well as Linux 2009-06-01 12:58:14 +00:00
Jani Taskinen bfa336e891 fix news 2009-06-01 09:00:54 +00:00
Stanislav Malyshev ac345b5915 fix for #48247 2009-05-31 21:31:15 +00:00
Stanislav Malyshev dc4bfd4d80 fix for #48247 2009-05-31 20:43:57 +00:00
Andrei Zmievski 63b6c3bab3 MFB 2009-05-31 18:55:36 +00:00
Ilia Alshanetsky 355ffae8dc MFB: Fixed bug #48359 (Script hangs on snmprealwalk if OID is not
increasing)
2009-05-31 14:14:07 +00:00
Jani Taskinen e636ed5789 MFH: no dots in errors 2009-05-31 13:51:23 +00:00
Andrei Zmievski 426522f4e0 Expose encode/decode API. 2009-05-31 01:43:45 +00:00
Arnaud Le Blanc 06a48156f0 BFN 2009-05-30 16:42:50 +00:00
Arnaud Le Blanc 82655fb856 MFH: Take small blocks cache into account in memory_get_usage() 2009-05-30 16:42:24 +00:00
Arnaud Le Blanc 48fc6c5237 BFN 2009-05-30 16:36:01 +00:00
Arnaud Le Blanc 32a9ff9aef MFH: Fix aliasing issue (fixes #48409 , #48428 , #48228) 2009-05-30 16:35:26 +00:00
Zoe Slattery 0bae389aa4 better fix 2009-05-29 11:45:55 +00:00
Zoe Slattery 93ed844901 fixing to work with older levels of libcurl 2009-05-29 09:46:34 +00:00
Zoe Slattery e4a93c6d0a Engine execution order tests 2009-05-29 07:52:28 +00:00
Pierre Joye 1627157cdd - #42143, the constant NAN is reported as 0 on Windows 2009-05-29 07:29:20 +00:00
Scott MacVicar b702ce45ce Bug number was wrong. 2009-05-29 02:35:56 +00:00
Ilia Alshanetsky 47fcac267c Adjust news order 2009-05-29 01:31:58 +00:00
Scott MacVicar 6621987732 BFN 2009-05-29 00:05:56 +00:00
Scott MacVicar 4b5eda20ae MFH: Fix bug #48416 - Force a cache size for ereg to stop it getting out of control. Lazy LRU here. 2009-05-29 00:03:28 +00:00
Pierre Joye f5bf2d7ed7 - fix build with system gd 2009-05-28 14:06:06 +00:00
Pierre Joye 884c20439c - #48738 2009-05-28 14:04:19 +00:00
Pierre Joye 1a836712f0 - MFB: #48378, exif_read_data() segfaults on certain corrupted .jpeg files 2009-05-28 14:03:09 +00:00
Arnaud Le Blanc 7055f3bae5 MFH: New tests 2009-05-28 13:26:52 +00:00
Antony Dovgal a524e99076 fix test 2009-05-28 13:22:50 +00:00
Arnaud Le Blanc 721fe01e55 MFH: merged http ignore_errors context option
# [DOC] "since 5.2.10". See also bug #38802.
2009-05-28 13:20:22 +00:00
Arnaud Le Blanc 632c5a775f Fix "request_startup() for zlib module failed" when client does not
accepts compression and zlib.output_compression is On
2009-05-28 10:14:22 +00:00
Pierre Joye 99eede75b1 - mf53: fix build, stderr cannot be used as var or struct member 2009-05-27 22:38:53 +00:00
Robert Nicholson e29517872b Language Tests: returnByReference 2009-05-27 22:36:04 +00:00
Ilia Alshanetsky fea7c24372 Back to dev 2009-05-27 13:51:16 +00:00
Ilia Alshanetsky d6ddd48ed0 5.2.10RC1 2009-05-27 13:47:34 +00:00
Antony Dovgal 3197576f2c fix build 2009-05-27 09:57:13 +00:00
Jani Taskinen 91e968462f - Test for bug #48203 2009-05-26 17:19:35 +00:00
Jani Taskinen 572cd2000b MFH:- Fixed bug #48203 (Crash when CURLOPT_STDERR is set to regular file) 2009-05-26 15:50:44 +00:00
Ilia Alshanetsky d080807957 timezone update news 2009-05-26 14:38:34 +00:00
Derick Rethans a6fdd53b90 - Updated to version 2009.8 (2009h) 2009-05-26 14:27:08 +00:00
Arnaud Le Blanc fb69372707 MFH: Fix return value of pcntl_wexitstatus() (fixes #47566,
patch by james at jamesreno dot com)
2009-05-26 14:02:34 +00:00
Felipe Pena 886690219d - Removed XFAIL section 2009-05-26 13:51:04 +00:00
Felipe Pena d9722865f7 - Fixed compile warning 2009-05-26 12:37:52 +00:00
Jani Taskinen b90c2e7cb1 - Revert this, was not supposed to be merged yet 2009-05-26 10:15:08 +00:00
Jani Taskinen 0b6182b683 fix test 2009-05-26 10:13:01 +00:00
Pierre Joye f974d42e18 - add a note about the actual problen so we don't forget it 2009-05-26 08:09:37 +00:00
Jani Taskinen 7d8ff0b3fc - Added note about omitted break 2009-05-26 08:03:29 +00:00
Eric Stewart ddf40dc32d Add tests:
DOMComment::__construct() with constructor called twice.
DOMDocumentFragment::appendXML() with unbound fragment.
DOMDocumentFragment::appendXML() with unbalanced chunks.
DOMDocumentFragment::__construct() called twice.
DOMDocumentType: basic access to all properties.
DOMDocumentType::name with invalid state.
DOMDocumentType::entities with invalid state.
DOMDocumentType::notations with invalid state.
DOMDocumentType::publicId with invalid state.
DOMDocumentType::publicId with empty value.
DOMDocumentType::systemId with invalid state.
DOMDocumentType::systemId with empty value.
DOMDocumentType::internalSubset with invalid state.
2009-05-26 06:06:40 +00:00
Jani Taskinen 011ec5b1af MF53: - Fixed bug #45202 (zlib.output_compression can not be set with ini_set()
# This is fixed in HEAD already. :)
2009-05-26 05:57:40 +00:00
Jani Taskinen 6abaea16ef MFH:- Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped) 2009-05-26 04:47:05 +00:00
Jani Taskinen e3d54cd30e cs + ws 2009-05-26 04:45:21 +00:00
Kalle Sommer Nielsen 3e6435e3c4 MFH: Typo 2009-05-25 19:41:41 +00:00
Pierre Joye a42f47071f - #48202 2009-05-25 16:30:37 +00:00
Pierre Joye 88667674e2 - MFH: #48202, Out of memory error when passing non-existing filename, enable related tests (marked as XFAIL now) 2009-05-25 16:27:45 +00:00
Rasmus Lerdorf 13c65dd8f7 Argh! Please do not include entire GPL'ed packages in the PHP
distribution.  Removing test and entire phpMyAdmin distribution
in bug.tar.
2009-05-25 11:57:25 +00:00
Eric Stewart 802706c8a9 Add the following new tests:
DOMCharacterData::appendData() with no arguments.
DOMCharacterData::deleteData() with count exceeding string size.
DOMCharacterData::deleteData() with no arguments.
DOMCharacterData::deleteData() with offset exceeding string size.
DOMCharacterData::insertData() with no arguments.
DOMCharacterData::replaceData() with no arguments.
DOMComment::__construct() with more arguments than acceptable.
DOMDocumentFragment::__construct().
DOMDocumentFragment::__construct() with too many errors.
DOMDocumentFragment::appendXML() with no arguments.
DOMDocumentFragment::appendXML() with children with properties.
2009-05-25 05:58:47 +00:00
Ilia Alshanetsky 0008c005b9 Improve fix for bug #48313 2009-05-24 16:02:22 +00:00
Felipe Pena 4f89db675d - New tests (testfest BerlinUG) 2009-05-23 14:52:54 +00:00
Felipe Pena afbe0bfb19 - Fix error message 2009-05-23 14:31:15 +00:00
Eric Stewart 39d82c35c3 New test: DOMAttr read $name property.
New test: DOMAttr read $ownerElement with null parent.
New test: DOMAttr write non-string $value property
New test: DOMCDATASection __construct() with no arguments.
New test: DOMCharacterData - Invalid State Error when getting data out of content.
2009-05-23 01:43:48 +00:00
Eric Stewart 9f6c828f63 New test: DOMAttr __construct() with no arguments. 2009-05-23 01:34:05 +00:00
Felipe Pena f14ec051af - MFH: Fixed invalid date checking 2009-05-22 12:50:44 +00:00
Felipe Pena 0be28396ae - New test 2009-05-22 12:39:14 +00:00
Arnaud Le Blanc 72f551ca66 BFN 2009-05-22 11:23:21 +00:00
Arnaud Le Blanc 80f98df54e MFH: Use zend_get_property_info() in get_class_vars() (fixes #46812) 2009-05-22 11:23:11 +00:00
Arnaud Le Blanc 415b75e3f5 MFH: Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not
work with redeclared property)
(patch by Markus dot Lidel at shadowconnect dot com)
2009-05-21 16:05:11 +00:00
Arnaud Le Blanc ecf2cabcdd MFH: set second argument of gettimeofday() to NULL (fixes #48346,
patch by adriano at guiadohardware dot net)
2009-05-21 14:21:53 +00:00
Arnaud Le Blanc 011547bd36 MFH: Better fix for #45622 (patch by robinf at php do net) 2009-05-21 13:26:29 +00:00
Ilia Alshanetsky 0c3d8accbb MFB: Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out
when working with a non-writable stream)
2009-05-21 12:53:24 +00:00
Ilia Alshanetsky 1bebeea29c Re-introduce the Matteo's patch and combine default & text handling since
they appear to be the same irregardless on notes inside sqlite3.h
2009-05-20 15:03:16 +00:00
Jani Taskinen 77816c4ed9 - Fix win32 build 2009-05-20 12:09:33 +00:00
Kalle Sommer Nielsen 020749e160 MFH: Fixed shared build 2009-05-20 10:19:28 +00:00
Arnaud Le Blanc bcfdedd53f MFH: Fix skipif 2009-05-20 10:08:42 +00:00
Antony Dovgal e0ca27fc23 sync with HEAD 2009-05-20 09:26:20 +00:00
Arnaud Le Blanc d3ec090688 MFH: set default value of "precision" ini setting,
many tests depend on this
2009-05-20 09:23:15 +00:00
Arnaud Le Blanc b43345ec0c MFH: Fix skipif 2009-05-20 09:13:39 +00:00
Arnaud Le Blanc 7728a703f6 MFH: Fixed bug #48326 (constant MSG_DONTWAIT not defined) 2009-05-20 09:06:31 +00:00
Jani Taskinen fbaed2ba81 ws 2009-05-19 19:38:00 +00:00
Ilia Alshanetsky a607ee15a8 MFB: The \0 removal is only needed prior to 3.4.0 2009-05-19 19:20:01 +00:00
Ilia Alshanetsky 1989085325 MFB: Revert faulty warning fix 2009-05-19 16:14:37 +00:00
Jani Taskinen bb33de84b0 - Revert bad compile warning fix which causes compile failures with older glibc 2009-05-19 15:37:38 +00:00
Jani Taskinen 3c984d6d4f MFH:- Fix test: since cURL 7.19.4 CURLINFO_CONTENT_LENGTH_* return -1 if the size is unknown 2009-05-19 14:05:49 +00:00
Jani Taskinen bdfcb7ca73 MFH: Sync with PHP_5_3 the WS/CS and some missing constant fixes 2009-05-19 13:50:32 +00:00
Jani Taskinen 61abd918e7 MFH: Unify macros 2009-05-19 11:12:33 +00:00
Kalle Sommer Nielsen 70ebbdea0a MFH: Fix --with-pdo-mssql build and add some warnings if header/libs are not found 2009-05-19 10:22:31 +00:00
Ilia Alshanetsky 558d25649d MFB: Fixed bug #48313 (fgetcsv() does not return null for empty rows) 2009-05-18 18:46:06 +00:00
Jani Taskinen 422a101fae MFH: Sync WS / CS changes where applicable 2009-05-18 17:23:42 +00:00
Hannes Magnusson 2b72a6df0a MFH: Print out WARNed 2009-05-18 14:08:56 +00:00
Pierre Joye d6e3b89d9b - WS 2009-05-18 09:11:31 +00:00
Felipe Pena 40cabb39c6 - New tests (testfest BerlinUG) 2009-05-17 18:08:27 +00:00
Felipe Pena fe6bbdca72 - New tests (testfet LondonUG) 2009-05-17 15:46:37 +00:00
Arnaud Le Blanc ea8bdf5d8f MFH: Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not
update stream position of plain files)
2009-05-17 14:59:24 +00:00
Felipe Pena 7323f24b58 - New tests (testfest DutchUG) 2009-05-16 23:56:23 +00:00
Arnaud Le Blanc bcfdf04cbf MFH: Fix warning when inner stream of a temp:// stream is closed before
the stream ifself
2009-05-16 20:28:02 +00:00
Arnaud Le Blanc 49fa689d5b MFH: Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source
is a socket)
2009-05-16 20:24:01 +00:00
Felipe Pena 8d7a9aa9a3 - New tests (testfest Quebec) 2009-05-16 18:27:19 +00:00
Felipe Pena 30ef00c15c - Added responder dir (synced) 2009-05-16 17:08:10 +00:00
Felipe Pena c299ac0bd4 - New tests (testfest ParisUG) 2009-05-16 16:38:17 +00:00
Felipe Pena 4324c10d24 - New tests (testfest DutchUG) 2009-05-16 15:14:25 +00:00
Felipe Pena 2a39c5e435 - New tests (testfest CataloniaUG) 2009-05-16 14:41:48 +00:00
Jani Taskinen 16d4cad828 - Reverted is such a strong word.. :) 2009-05-15 17:18:18 +00:00
Moriyoshi Koizumi 22ce11b711 - Not a news actually. 2009-05-15 17:06:35 +00:00
Moriyoshi Koizumi 9ebb304ed5 - MFH: Roll it back. 2009-05-15 17:03:43 +00:00
Christopher Jones 255d78111a MFH: New array_multisort() test (Simon Westcott) 2009-05-15 16:47:36 +00:00
Felipe Pena 56274f384a - Fix tests 2009-05-14 23:29:27 +00:00
Jani Taskinen 36b2ebf95f - Fix the harmless patch that caused harm :) 2009-05-14 21:23:03 +00:00
Jani Taskinen 4d82ed968e MFH 2009-05-14 21:00:37 +00:00
Moriyoshi Koizumi 3bb8d604c7 - MFH:Add a new test for the additional delimiter of the encoding conversion
filter
2009-05-14 19:07:41 +00:00
Moriyoshi Koizumi afc82c756c - MFH: Update the test as newer libc gets the bogus input through rather than
rejecting it.
2009-05-14 19:07:18 +00:00
Arnaud Le Blanc 996920a889 moved from 5.3 2009-05-14 19:04:14 +00:00
Jani Taskinen 71b329c703 MFH: Fixed module loading order and made request shutdown functions also to
be loaded in reverse like all other shutdowns are.
2009-05-14 18:34:27 +00:00
Felipe Pena 5f6b9cf5f6 - MFH: Improved fix for #42414 2009-05-14 17:25:51 +00:00
Arnaud Le Blanc 4710871ab8 MFB: Fixed bug #45622 (isset($arrayObject->p) misbehaves with
ArrayObject::ARRAY_AS_PROPS set)
2009-05-14 16:44:54 +00:00
Arnaud Le Blanc efdaf53cf5 MFB: Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st
private prop of wrapped object)
2009-05-14 16:43:38 +00:00
Arnaud Le Blanc 3008404116 moved from 5.3 2009-05-14 16:24:12 +00:00
Arnaud Le Blanc 0a9e3e3d86 MFB: Fixed #42663 (gzinflate() try to allocate all memory with truncated
data)
2009-05-14 16:17:47 +00:00
Arnaud Le Blanc f6f23616b0 MFB: fix skipifs 2009-05-14 16:17:10 +00:00
Arnaud Le Blanc f7e075e4b9 MFB: Fix test (use canonical name, fixes #45493) 2009-05-14 16:16:33 +00:00
Arnaud Le Blanc 947b9ce3f3 MFB: Fixed #45540 (stream_context_create creates bad http request) 2009-05-14 16:15:38 +00:00
Jani Taskinen 2cce527199 MFH: prevent freeing NULL 2009-05-14 13:49:50 +00:00
Jani Taskinen 33bcc088ca MFH:- Fixed bug #48256 (Crash due to double-linking of history.o) 2009-05-14 13:43:52 +00:00
Ilia Alshanetsky eaf1121b7e MFB: Fixed\ compiler\ warnings 2009-05-14 12:36:19 +00:00
Dmitry Stogov b2ce675b6a Fixed wrong return value 2009-05-14 08:21:38 +00:00
Felipe Pena 9c0cfe0d6c BFN 2009-05-14 01:31:50 +00:00
Felipe Pena 00a0efa5a2 - New tests 2009-05-14 01:29:37 +00:00
Matt Wilmas 938763c753 MFH: Fixed bug #45877 (Array key '2147483647' left as string) 2009-05-14 01:28:15 +00:00
Felipe Pena 913c81d4ad MFH:
- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC driver)
  patch by: jhml at gmx dot net
2009-05-14 01:27:23 +00:00
Ilia Alshanetsky 82b940adf2 MFB: Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime). 2009-05-13 14:25:58 +00:00
Felipe Pena 040a647481 - MFH: Fixed bug #48240 (DBA Segmentation fault dba_nextkey) 2009-05-13 02:16:36 +00:00
Felipe Pena 20fd5b9932 - MFH: Fixed bug #48248 (SIGSEGV when access to private property via &__get) 2009-05-12 23:01:38 +00:00
Matteo Beccati 299a6a2baf Added proper credits for the last commit 2009-05-12 22:01:55 +00:00
Matteo Beccati 865194fa4d MFH
- Backported fix for #44301
- Fixed bug #48070
# The backport was required to also fix #48070
2009-05-12 21:57:42 +00:00
Ilia Alshanetsky fb7437d7f1 MFB: Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns
wrong result)
2009-05-12 12:35:45 +00:00
Felipe Pena e40df88ad6 - MFH: Fix code && new test 2009-05-11 15:13:35 +00:00
Felipe Pena aa1be9514f - Added missing param checks 2009-05-11 14:15:07 +00:00
Ilia Alshanetsky 3222df99d9 MFB: Fixed bug #48204 (xmlwriter_open_uri() does not emit warnings on invalid
paths)
2009-05-11 12:35:00 +00:00
Pierre Joye 3e738e7a46 - MFH: define HAVE_PQPROTOCOLVERSION and HAVE_PG_LO_CREATE (Tim Starling) 2009-05-11 10:44:25 +00:00
Jani Taskinen a05ca2c6d3 - Fix paths 2009-05-11 05:01:48 +00:00
Felipe Pena 5626bcabf2 - Starting tests for this extension 2009-05-11 03:10:31 +00:00
Etienne Kneuss a7b3f59f7b Add test for #48224 2009-05-10 20:11:37 +00:00
Etienne Kneuss c94580895f Fix #48224 (Remove incorrect shuffle) 2009-05-10 16:45:01 +00:00
Felipe Pena 8a15edc308 - Simplify test (cweiske) 2009-05-10 15:48:53 +00:00
Felipe Pena 6fbed2a9f3 - MFH: Fixed bug #48221 (memory leak when passing invalid xslt parameter) 2009-05-10 15:15:47 +00:00
Ilia Alshanetsky a18c0be994 WS 2009-05-10 13:44:13 +00:00
Felipe Pena 7e62c98201 - MFH: Fixed memory leak (patch by Christian Weiske) 2009-05-10 01:07:01 +00:00
Etienne Kneuss 251d108d58 Add test for bug #47534 2009-05-09 20:58:34 +00:00
Scott MacVicar 2c3579fdd7 BFN 2009-05-09 20:42:56 +00:00
Jani Taskinen 84208a6740 MFH: Add support for Sun CC 2009-05-09 20:36:35 +00:00
Jani Taskinen c7bc9053e1 MFH: sync + - Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi) 2009-05-09 20:28:03 +00:00
Scott MacVicar a2d837585e MFH Fix bug #48206 - Iterating over an invalid data structure leads to a segfault 2009-05-09 19:48:15 +00:00
Matt Wilmas 4ad3ac09c1 MFH: Better fix for bug #42767 (at source instead of workaround); also fixes unclosed comments in tokenizer
- Plus minor cleanup of unnecessary code, to match 5.3...
2009-05-08 17:50:58 +00:00
Arnaud Le Blanc 78ecc18710 MFB5.3 fix for bug #44034 (FILE_IGNORE_NEW_LINES in file() does not work as
expected when lines end in \r\n) (fixes #48175)
2009-05-08 09:49:27 +00:00
Jani Taskinen 48c50e616a - Bug 45392 was never fixed in PHP_5_2 2009-05-07 13:45:48 +00:00
Jani Taskinen 51735ad33f MFH 2009-05-06 19:03:23 +00:00
Ilia Alshanetsky 7f3ba73b3d MFB: Fixed bug #48156 (Added support for lcov v1.7) 2009-05-06 14:05:54 +00:00
Pierre Joye 0b6e00cd64 - fix conf 2009-05-05 13:49:05 +00:00
Pierre Joye 95b9e430f4 - MFH: fix build 2009-05-05 10:58:24 +00:00
Jani Taskinen 271b03b6f7 MFH: - Fixed Bug #45092 header HTTP context option not being used (--with-curlwrappers) 2009-05-05 00:33:03 +00:00
Jani Taskinen d3d84cc152 MFH: sync 2009-05-05 00:25:40 +00:00
Derick Rethans 4ece5a103e - MFH: Fixed warnings 2009-05-04 19:55:42 +00:00
Pierre Joye a07b780bc6 - fix build 2009-05-04 17:08:43 +00:00
Antony Dovgal e3685d6918 MFH: use correct function 2009-05-04 14:46:37 +00:00
Ilia Alshanetsky d48cc34211 Fixed a possible crash 2009-05-04 14:43:14 +00:00
Ilia Alshanetsky bb451fe8ac Fixed bad merge 2009-05-04 14:12:23 +00:00
Ilia Alshanetsky 34f39a1086 MFB: Fixed bug #48131 (Don't try to bind ipv4 addresses to ipv6 ips via
bindto)
2009-05-04 13:12:35 +00:00
Derick Rethans 0bc4075753 - MFH: Fixed bug #45191 (error_log ignores date.timezone php.ini val when
setting logging timestamps).
2009-05-03 19:09:23 +00:00
Derick Rethans 6d32ad3c1f - MFH: Fixed bug #48058 (Year formatter goes wrong with out-of-int range).
- MFH: Fixed bug #45822 (Near infinite-loops while parsing huge relative offsets).
2009-05-03 18:22:59 +00:00
Derick Rethans 0c040fc5d3 - MFH: Added test for (bogus) bug #48097. 2009-05-03 14:28:38 +00:00
Jani Taskinen ca6a024965 MFH:- Fixed bug #48132 (configure fails to test curl ssl support if --disable-rpath is set) 2009-05-02 19:55:14 +00:00
Jani Taskinen 3cea6c7bf4 - SPL can be disabled in PHP_5_2 2009-05-02 18:10:44 +00:00
Jani Taskinen b6b8b5ffc6 - SPL can be disabled in PHP_5_2 2009-05-02 18:02:09 +00:00
Ilia Alshanetsky a0ef3cc010 Fixed build, zend_parse_parameters_none() does not exist in 5.2 branch 2009-05-02 15:58:39 +00:00
Jani Taskinen 30bc1b72ef - Fix test 2009-05-02 03:17:51 +00:00
Kalle Sommer Nielsen 5b05a2da10 MFH: Update copyright year + line feeds 2009-05-02 01:54:25 +00:00
Kalle Sommer Nielsen c7c4b92b38 MFH: Fix proto + use zend_parse_parameters_none() 2009-05-02 01:38:36 +00:00
Jani Taskinen c9a717fcb8 MFH:- Fix compile warning in debug mode 2009-05-01 21:47:05 +00:00
Jani Taskinen 38450822ae - ws / cs (separated from another commit coming next) 2009-05-01 20:30:59 +00:00
Felipe Pena 4b90dd8f06 - MFH: Fixed bug #48038 (odbc_execute changes variables used to form params array) 2009-05-01 03:06:39 +00:00
Felipe Pena 4121be50e9 - MFH: Fixed bug #48120 (Implementing abstract class FilterIterator in regexiterator.inc) 2009-05-01 01:55:52 +00:00
Antony Dovgal c133062470 fix test (for real) 2009-04-30 20:35:37 +00:00
Pierre Joye 802cbbd49b - #47940, memory leaks in imap_body 2009-04-30 18:55:44 +00:00
Ilia Alshanetsky 5812e33052 Fixed typo 2009-04-30 17:43:25 +00:00
Pierre Joye 5759108ed0 - 45997 2009-04-30 15:26:54 +00:00
Pierre Joye 4d2e295344 - #45997, safe_mode bypass with exec/sytem/passthru (windows only) 2009-04-30 15:25:05 +00:00
Jani Taskinen 8d7ecdfdbb MFH: fix tests 2009-04-30 13:22:24 +00:00
Jani Taskinen b91afb10af - Fix test: It is still possible to enable/disable fastcgi in PHP_5_2 2009-04-30 13:02:43 +00:00
Jani Taskinen 0bdbd69561 - Added missing tests from this branch..*sigh* 2009-04-30 11:39:01 +00:00
Jani Taskinen 0445f9025b - Reflection can be disabled in PHP_5_2 2009-04-30 11:14:09 +00:00
Jani Taskinen 6712e8680c - Fix test + add missing test 2009-04-30 10:41:32 +00:00
Jani Taskinen eb0ae9417b - It is possible to disable reflection extension in PHP_5_2 2009-04-30 09:56:15 +00:00
Jani Taskinen 8294411819 - It is possible to disable reflection extension in PHP_5_2 2009-04-30 09:50:48 +00:00
Ilia Alshanetsky 51eb7b4aea Update tests to accomodate new parameter parsing API and make long2ip() use
it as well
2009-04-29 22:06:28 +00:00
Ilia Alshanetsky a4bc21cbe5 timezone db upgrade news 2009-04-29 21:56:12 +00:00
Derick Rethans 323769820f - Updated to version 2009.7 (2009g) 2009-04-29 11:12:13 +00:00
Zoe Slattery 38576823b1 Refixing to follow documented behaviour 2009-04-29 07:52:03 +00:00
Felipe Pena 7b62380d6b - Fix test 2009-04-28 23:46:39 +00:00
Ilia Alshanetsky 1e09a216e4 MFB: Fixed bug #47365 (ip2long() may allow some invalid values on certain
64bit systems)
2009-04-28 22:31:25 +00:00
Pierre Joye de44ff21e5 - mail_criteria entry and revert previous wrong one 2009-04-28 13:01:04 +00:00
Pierre Joye 323984a1ae - MFH: SEARCHPGM struct has to be freed 2009-04-28 12:43:10 +00:00
Antony Dovgal 1ae79dfe28 fix test 2009-04-28 09:04:17 +00:00
Antony Dovgal ba70e77b43 nuke unicode crap, fix test 2009-04-28 09:02:37 +00:00
Pierre Joye f2445c083a - space to tabs
- CS
2009-04-28 08:33:25 +00:00
Felipe Pena f096e27011 - BFN 2009-04-27 20:03:16 +00:00
Felipe Pena ff12af6133 - MFH: Fixed bug #47254 (Wrong Reflection for extends class) 2009-04-27 19:54:35 +00:00
Scott MacVicar 7fbf3433c7 MFH Fix bug #47695 - xmlrpc --with-iconv-dir mangles --with-iconv if they use different iconv versions. Could also just add a dependency on iconv to fix this. 2009-04-27 18:38:58 +00:00
Pierre Joye 9f8376ead3 - utf8_mime2text is present in 5.2's cclient 2009-04-27 08:23:29 +00:00
Pierre Joye 6c80425fb1 - MFH: add latest cclient versions 2009-04-27 00:01:15 +00:00
Sebastian Schürmann 82be89d366 - fixes to tests
- spl_classes only checks  for is_array(), the output in 5_3_0 and 5_2_0 is very different,
test will run this way in 5.2 and 5.3 w.o. problems
- call user method recognizes the different errormessage in 5_2_0 now
- the php_sap_name_variation001 check now goes for cgi instead of the cgi-fcgi output string
2009-04-26 23:54:12 +00:00
Jani Taskinen 9f729f9c6b MF53: Sync the session.c file structure and some bug fixes forgotten to merge. 2009-04-26 01:20:56 +00:00
Jani Taskinen ff9c528454 - Fix test cleanup 2009-04-26 01:20:03 +00:00
Jani Taskinen 7f97b581c2 - Missing skip section 2009-04-25 21:37:00 +00:00
Sebastian Schürmann 3f511f6ddb Initial import 2009-04-25 19:06:58 +00:00
Sebastian Schürmann dd7d7e2b6e Initial commit 2009-04-25 18:59:54 +00:00
Sebastian Schürmann cb22f59dbd Initial commit 2009-04-25 18:51:52 +00:00
Sebastian Schürmann 706152d40d Initial commit 2009-04-25 18:44:42 +00:00
Sebastian Schürmann 35d506b942 - Initial commit 2009-04-25 18:36:04 +00:00
Sebastian Schürmann 055622caf2 Initial commit 2009-04-25 18:29:23 +00:00
Jani Taskinen 22717a0c8c fix .cvsignore (Tony, it is not illegal to MFH to PHP_5_2..) 2009-04-25 18:26:49 +00:00
Jani Taskinen 7c7b7b4042 - In PHP_5_2 it is still possible to disable reflection. 2009-04-25 17:29:46 +00:00
Jani Taskinen 0608b239ab MFH: add .cvsignore file 2009-04-25 17:16:59 +00:00
Jani Taskinen f5748aab6c - Added missing entry 2009-04-25 17:15:38 +00:00
Jani Taskinen 631e6fc427 MFH: Sync 2009-04-25 17:12:11 +00:00
Jani Taskinen 030bfc24ab - Fix bad check (Hannes, please test stuff you commit..) 2009-04-25 16:54:50 +00:00
Pierre Joye 89f977c117 - ws 2009-04-25 16:36:02 +00:00
Pierre Joye 28e7780326 - #47940, pass body_len 2009-04-24 14:53:59 +00:00
Pierre Joye fab09bda92 - #47940 entry 2009-04-23 22:34:47 +00:00
Pierre Joye 8abacb0292 - MFH: #47940, leaks in imap_body() 2009-04-23 22:32:41 +00:00
Takeshi Abe 4b0df64a46 MFH: check non-null before any use. 2009-04-23 16:28:39 +00:00
andy wharmby ce125a6d46 Fix test 2009-04-21 08:53:26 +00:00
Jani Taskinen 97400732ad MFH:- Added path sanity check (autotools + libtool do not cope with whitespace..) 2009-04-20 15:03:57 +00:00
Mikko Koppanen 12e8c8ddc7 NEWS entry related to #47991 2009-04-20 10:03:21 +00:00
Mikko Koppanen d34a636598 MFH: Closes #47991 SSL streams fail if error stack contains items 2009-04-20 10:00:41 +00:00
Arnaud Le Blanc b6dc5c0574 MFH: Fix test 2009-04-19 22:02:06 +00:00
Arnaud Le Blanc 91e30c22d1 MFH: Better fix for #47997 2009-04-19 17:10:52 +00:00
Ilia Alshanetsky 8b083a9938 MFB: Fixed bug #47937 (system() calls sapi_flush() regardless of output
buffering)
2009-04-19 15:01:11 +00:00
Arnaud Le Blanc ce2c662791 MFB5.3: Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams) 2009-04-19 14:44:09 +00:00
Felipe Pena 1a9b6363f4 - MFH: Fix build 2009-04-18 18:56:58 +00:00
Ilia Alshanetsky 96ec5091f5 MFB: Fixed compiler warning 2009-04-16 22:14:52 +00:00
Pierre Joye 4aab8b21ac - fix zts build 2009-04-16 14:26:09 +00:00
Hannes Magnusson 9d028122b4 BFN 2009-04-16 13:53:24 +00:00
Hannes Magnusson c3fd834e3a MFH: Fixed bug#47981 (error handler not called regardless) 2009-04-16 13:52:23 +00:00
Pierre Joye c557abeb04 - improve file:// deactivation in curl_init and do not allow to enable it again manually 2009-04-16 13:51:55 +00:00
Hannes Magnusson 3fcaf01902 MFH: sync WS 2009-04-16 13:43:28 +00:00
Hannes Magnusson a61ac8cfe6 MFH: make it possible to run on 5.2.7 2009-04-16 13:41:50 +00:00
Pierre Joye 4ebb71d265 - disable file:// when safe_mode or open_basedir are enabled 2009-04-16 09:47:33 +00:00
Pierre Joye 716cc044ef - #47978, typo in ext/sockets/sockets.c 2009-04-16 05:32:38 +00:00
Moriyoshi Koizumi adefeac748 - MFH: Just a paranoiac test. This works perfectly. 2009-04-16 02:07:53 +00:00
Antony Dovgal f2e15c11c4 sync test with other branches 2009-04-15 20:57:26 +00:00
Antony Dovgal d60e754107 fix test 2009-04-15 20:54:59 +00:00
Ilia Alshanetsky 0a68541055 MFB: Fixed bug #47969 (ezmlm_hash() returns different values depend on OS) 2009-04-15 14:25:06 +00:00
Nuno Lopes 925c892dc9 MFH: fix bug #47662: support more than 127 named subpatterns 2009-04-14 20:31:32 +00:00
Nuno Lopes 66ec8d9632 upgrade to pcre 7.9 2009-04-14 20:29:09 +00:00
Antony Dovgal 5765def870 MFH: revert wrong fix for bug #47930 2009-04-14 14:18:49 +00:00
Stanislav Malyshev 077c6ea03b add fix #47930 2009-04-13 19:38:52 +00:00
Stanislav Malyshev 3e2513d8f3 fix #47930 2009-04-13 19:37:35 +00:00
Derick Rethans af99e4e438 - Updated to version 2009.6 (2009f) 2009-04-13 13:41:47 +00:00
Ilia Alshanetsky 6b719df163 MFB: Fixed bug #47946 (ImageConvolution overwrites background) 2009-04-12 14:44:34 +00:00
Rasmus Lerdorf 629eecbf7c Don't strip leading zeros on floating point numbers
And fix the test case
2009-04-09 16:04:15 +00:00
Ilia Alshanetsky 3ac8882dc1 Added test for php_sapi_name() 2009-04-09 13:28:22 +00:00
Hannes Magnusson a987ae115d Engelsk grammatikk 2009-04-09 10:20:39 +00:00
Hannes Magnusson 053c91d1ce MFH: Fixed bug#47427 (-s outputs, not displays) 2009-04-09 10:08:14 +00:00
Rasmus Lerdorf 9f9266cd88 Fixed bug #44929 - Better handling of leading zeros 2009-04-08 18:16:06 +00:00
Sebastian Bergmann 7aea024b69 MFH: Rename reflection*.phpt to Reflection*.phpt for consistency. 2009-04-08 16:09:30 +00:00
Felipe Pena db53404011 - Fixed bug #47801 (__call() accessed via parent:: operator is provided incorrect method name) 2009-04-08 00:28:06 +00:00
Felipe Pena 22c4a22379 - MFH: Fix ZTS build 2009-04-08 00:16:50 +00:00
Ilia Alshanetsky 944f02b46d Let's actually say what was updates ;-)
# Thanks Jani & Johannes
2009-04-07 17:06:53 +00:00
Arnaud Le Blanc 2b3e1ecece MFH: Fixed bug #47893 (CLI aborts on non blocking stdout) 2009-04-07 16:11:57 +00:00
Rob Richards ff4522e7dc BFN 2009-04-07 15:34:37 +00:00
Rob Richards 8728f276f9 MFH: fix bug #47849 (Non-deep import loses the namespace)
add test
2009-04-07 15:33:20 +00:00
Ilia Alshanetsky 4399a96a6b News 2009-04-07 14:08:39 +00:00
Kalle Sommer Nielsen 88c8ecb0a7 MFB53: Revert previous commit as it was causing alot more trouble than expected 2009-04-07 11:45:50 +00:00
Felipe Pena d52ad52511 - Fixed bug #47903 ("@" operator does not work with string offsets (PHP_5_2 only!))
(MFH: #39018)
2009-04-06 23:56:20 +00:00
Ilia Alshanetsky 792218240f Fixed test 2009-04-06 14:22:51 +00:00
Derick Rethans 8e5a9e931d - Updated to version 2009.5 (2009e) 2009-04-06 13:28:44 +00:00
Hannes Magnusson 7126bbbd9e MFH: Add test for bug#42596 2009-04-06 12:13:21 +00:00
Hannes Magnusson e3fb9c3e8f MFH: Fixed segfault on invalid session.save_path 2009-04-06 11:49:33 +00:00
Hannes Magnusson 9011deb604 MFH: Use an obscure name 2009-04-06 09:32:39 +00:00
Kalle Sommer Nielsen db1fa7fa80 MFB53: Kill warning about php_localtime_r not being defined 2009-04-06 09:17:47 +00:00
Dave Kelsey 51d28a7b17 bug 47886: fix test which failed during DST. Microsoft api working as designed, but unexpected. 2009-04-06 08:30:20 +00:00
Ilia Alshanetsky 3100dc31f0 Define _php_rfc822_len() only when needed 2009-04-05 14:10:49 +00:00
Felipe Pena d602767ec5 - Backported fix for #35386 (originally commited in 5.3+), reported recently as 5.2 bug #47845 2009-04-03 22:14:05 +00:00
Felipe Pena e5912d6486 - MFH: Fixed bug #47818 (Segfault due to bound callback param) 2009-04-02 15:55:02 +00:00
Matt Wilmas 77e3667550 MFH: Fixed tests, reverted changes from bug #47546 2009-04-02 09:42:32 +00:00
Matt Wilmas 8cad08f9a3 MFH: Fixed bug #47560 (explode()'s limit parameter odd behaviour) by reverting change for bug #47546 2009-04-01 17:07:46 +00:00
Felipe Pena 79dbf136b0 - MFH: Fixed bug #47852 (Compilation failure in zend_alloc.c) (Matteo) 2009-04-01 16:56:08 +00:00
Ilia Alshanetsky 72fed70e47 WS 2009-03-31 17:21:02 +00:00
Matt Wilmas 9c3e1e96b8 - MFH: Removed unused LONG_SIGN_MASK definition, and a stray \
- Changed sign flag to int (it's no longer being used in a calculation)
2009-03-31 11:22:19 +00:00
Dmitry Stogov 02f8fe6aa0 Fixed bug #47745 (FILTER_VALIDATE_INT doesn't allow minimum integer) 2009-03-31 10:05:38 +00:00
Ilia Alshanetsky ff9bc5c5e1 Fixed bug #47831 (Compile warning for strnlen() in main/spprintf.c)
# Patch by rainer\ dot\ jung\ at\ kippdata\ dot\ de
2009-03-30 19:59:08 +00:00
Pierre Joye 0bde38f6d2 - #47828 2009-03-30 18:05:42 +00:00
Pierre Joye 252f09fbe6 - better test case, it crashes on more architecture 2009-03-30 18:05:17 +00:00
andy wharmby 65e12bbf74 Fix date tests which started failing after change to BST 2009-03-30 12:35:30 +00:00
Scott MacVicar 4904830ca5 MFH Add test for bug #47828 2009-03-30 09:18:21 +00:00
Scott MacVicar 10d64bd4a9 MFH Fix test, -2147483648 is a valid unsigned int where -2147483649 isn't. 2009-03-30 00:41:39 +00:00
Scott MacVicar 966e1e6833 BFN 2009-03-29 23:35:58 +00:00
Scott MacVicar 6e617627f6 MFH Fix bug #47828 - Converting to UTF-8 can sometimes fail, check error codes and avoid segfault. 2009-03-29 23:33:01 +00:00
Ilia Alshanetsky 947df429ca Fixed compiler warning 2009-03-29 17:04:05 +00:00
Felipe Pena 9118a6ba7d - Add test 2009-03-27 16:53:03 +00:00
Felipe Pena 65d1a3a441 MFH: - Fixed bug #47769 (Strange extends PDO) 2009-03-27 16:50:38 +00:00
Christian Seiler bf8ac5f70c MFB: Fixed memory leak in ob_get_clean/ob_get_flush. 2009-03-26 00:00:18 +00:00
Ilia Alshanetsky 255422ab1e MFB: Fixed bug #47772 (FILTER_VALIDATE_EMAIL allows foo@bar. addresses) 2009-03-25 18:53:04 +00:00
Dmitry Stogov 5dda7e709c Fixed double efree() 2009-03-24 16:36:20 +00:00
Derick Rethans c95f7e8bb7 - Updated to version 2009.4 (2009d) 2009-03-23 21:40:11 +00:00
Derick Rethans 3fdd12683f - Updated to version 2009.3 (2009c) 2009-03-22 11:50:20 +00:00
Steph Fox 4219951e86 BFN 2009-03-20 22:14:45 +00:00
Steph Fox d92e82edc2 MFH: Fixed bug #38805 ( PDO Truncates Text from SQL Server Text Data Type Field)
- Bring behaviour into line with ext/mssql
  - Several memleaks plugged
2009-03-20 22:14:17 +00:00
Uwe Schindler 2b43578d54 Fix a sigsegv on server shutdown, add missing sapi_shutdown(). 2009-03-20 15:54:36 +00:00
Zoe Slattery ea9f303dd2 clarification of wwwhether 'make test' needs the PHP xecutable to be set 2009-03-20 15:44:14 +00:00
Zoe Slattery bdfafa3dd4 added skipif for root 2009-03-20 08:57:30 +00:00
Kalle Sommer Nielsen a2ad68d054 Fix typo 2009-03-20 08:39:42 +00:00
Ilia Alshanetsky aa89f171fa Fixed bug #47721 (Aligment issues in mbstring and sysvshm extension) 2009-03-19 23:10:44 +00:00
Matt Wilmas 85c513c1fc MFH: Handle overflow when decoding large numbers and avoid 2 conversions 2009-03-19 19:27:14 +00:00
Arnaud Le Blanc d72e47f4af MFH: Better fix for #44607. Fixes #47487 (php_stream_fill_read_buffer()
performance degraded after fix of bug 44607).
2009-03-19 17:56:01 +00:00
andy wharmby 1ed6d9109e New tests for various date extension functions. Tested on Windows, Linux and linux 64 2009-03-18 23:34:57 +00:00
Moriyoshi Koizumi d2e781ff7e - MFH: Synching .dsp file (I am not sure whether I really should do this) 2009-03-18 17:34:43 +00:00
Moriyoshi Koizumi bbd2a36b74 - MFH: staticise private symbols 2009-03-18 16:53:46 +00:00
Dmitry Stogov 9e48089f65 Fixed bug #47704 (PHP crashes on some "bad" operations with string offsets) 2009-03-18 13:11:32 +00:00
andy wharmby 007685a39d New tests for date extension DateTime methods Tested on Windows, Linux and linux 64 2009-03-18 11:32:53 +00:00
andy wharmby baa0e628be New tests for date extension DateTimeZone methods Tested on Windows, Linux and linux 64 2009-03-18 11:13:00 +00:00
Pierre Joye c4e040a468 - #43073, TrueType bounding box is wrong for angle<>0 2009-03-18 08:15:27 +00:00
Felipe Pena 9d8330a389 - MFH: Year++ 2009-03-17 23:10:13 +00:00
Matt Wilmas c06fb2f274 MFH: Fixed bug #46882 (Serialize / Unserialize misbehaviour under OS with different bit numbers) 2009-03-17 22:04:57 +00:00
Christopher Jones 9d638e65c7 Fix INI blocks 2009-03-17 03:08:16 +00:00
Scott MacVicar a2374d6a81 BFN 2009-03-17 02:03:58 +00:00
Scott MacVicar 17530bbccd MFH Fix bug #47644 - Valid integers are truncated with json_decode() 2009-03-17 02:02:45 +00:00
Zoe Slattery b3542a6ec4 test for /ext/tidy from stefan priebsch 2009-03-16 20:38:51 +00:00
Felipe Pena 7e9fd69bd8 - MFH: Fixed bug #47616 (curl keeps crashing) 2009-03-16 15:09:51 +00:00
Mikko Koppanen 7edf0f9e96 Updated news file 2009-03-16 12:03:57 +00:00
Mikko Koppanen 109dc1e6f6 Closes bug #47667 2009-03-16 10:22:13 +00:00
Ilia Alshanetsky 9075bfd1d9 MFB53: Fix for get_defined_constants() 2009-03-16 00:39:09 +00:00
Moriyoshi Koizumi b48436eb77 - MFH: Fix a bug that mbstring.internal_encoding doesn't take effect within
the request encoding converter.
2009-03-15 20:44:17 +00:00
Takeshi Abe 7dcb90d877 MFH: Fixed bug #45799 (imagepng() crashes on empty image) 2009-03-14 17:48:42 +00:00
Stanislav Malyshev 0d161c7bfb record new curl options 2009-03-13 19:46:09 +00:00
Stanislav Malyshev 00f576cc97 add new CURL options 2009-03-13 19:43:49 +00:00
Rob Richards e6d3c85e89 fix build for VC9 2009-03-13 14:39:08 +00:00
Rob Richards 4103f0bfbd BFN 2009-03-13 13:45:07 +00:00
Rob Richards e5a211bafc fix bug #47430 (Errors after writing to nodeValue parameter of an absent previousSibling)
add test
2009-03-13 13:41:42 +00:00
Ilia Alshanetsky 32027f5944 MFB: Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a string
literal)
2009-03-12 22:54:15 +00:00
Zoe Slattery d189d478e3 refixing %r in run-tests.php (thanks iain lewis for the fix) 2009-03-12 20:45:43 +00:00
Andrei Zmievski baa869110b MFH 2009-03-12 16:13:39 +00:00
Ilia Alshanetsky b4c07450d2 MFB: Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware) 2009-03-08 18:22:26 +00:00
Kalle Sommer Nielsen ba65b35b7f MFH: Fix tests 2009-03-08 06:20:12 +00:00
Kalle Sommer Nielsen 4d8283a3ad MFH: Fixed bug #47546 (Default value for limit parameter in explode is 0, not -1) 2009-03-03 11:50:32 +00:00
Zoe Slattery f1092fb663 Added %r section 2009-03-03 10:54:16 +00:00
Moriyoshi Koizumi 023a3caf05 - MFH: Fix typo. 2009-03-02 04:44:35 +00:00
Ilia Alshanetsky 536ed996a0 MFB: Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6
addresses in the filter extension)
2009-03-01 17:36:09 +00:00
Ilia Alshanetsky ae31c3c66a MFB: Fixed 2 memory corruptions in zip extension idenfied by
oo_properties.phpt test
2009-03-01 17:35:25 +00:00
Uwe Schindler 2b2874eafd Fix Bug 47495: Keep header in internal list after add, so headers_list() works correctly. Other SAPIs have the same problem, but PHP 5.3 fixes this more elegant. 2009-02-25 19:52:06 +00:00
Ilia Alshanetsky 2d1f1b1b68 Back to dev 2009-02-25 15:34:33 +00:00
Ilia Alshanetsky e95f0a0058 5.2.9 2009-02-25 14:56:50 +00:00
Moriyoshi Koizumi 7db52b84b7 - Revert the patch then. 2009-02-24 15:09:43 +00:00
Moriyoshi Koizumi c5903bd6ab - MFH: strictly check UTF-8 and UTF-32 validity 2009-02-24 13:22:47 +00:00
Kalle Sommer Nielsen 6788dcf3bc Fixed #37209 (mssql_execute with non fatal errors) 2009-02-23 21:21:23 +00:00
Felipe Pena da3fad6285 - Fix test 2009-02-20 13:30:04 +00:00
Jani Taskinen ba9cdc0ad1 - spl is not forced on everyone in 5.2 branch. 2009-02-20 13:16:21 +00:00
Ilia Alshanetsky b764a1a782 Back to dev 2009-02-19 18:33:37 +00:00
2041 changed files with 98161 additions and 12446 deletions

No files matched your search

+19
View File
@@ -12,6 +12,25 @@ document ____executor_globals
ZTS detection is automatically based on ext/standard module struct
end
define print_cvs
____executor_globals
set $p = $eg.current_execute_data.CVs
set $c = $eg.current_execute_data.op_array.last_var
set $v = $eg.current_execute_data.op_array.vars
set $i = 0
printf "Compiled variables count: %d\n", $c
while $i < $c
printf "%d = %s\n", $i, $v[$i].name
if $p[$i] != 0
printzv *$p[$i]
else
printf "*uninitialized*\n"
end
set $i = $i + 1
end
end
define dump_bt
set $t = $arg0
while $t
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>php-5.2</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>
+2 -2
View File
@@ -58,8 +58,8 @@ Exceptions:
calling.
[7] When commenting out code using a #if statement, do NOT use 0 only. Instead
use "<cvs username here>_0". For example, #if FOO_0, where FOO is your
cvs user foo. This allows easier tracking of why code was commented out,
use "<svn username here>_0". For example, #if FOO_0, where FOO is your
svn user foo. This allows easier tracking of why code was commented out,
especially in bundled libraries.
[8] Do not define functions that are not available. For instance, if a
+1 -1
View File
@@ -206,7 +206,7 @@ STATUS: Working
SINCE: 5.1
-------------------------------------------------------------------------------
EXTENSION: pdo_pgsql
PRIMARY MAINTAINER: Unknown
PRIMARY MAINTAINER: Ilia Alshanetsky <iliaa@php.net>
MAINTENANCE: Odd fixes
STATUS: Working
SINCE: 5.1
+7 -10
View File
@@ -386,7 +386,7 @@ Apache 2.0 on Unix systems
http://snaps.php.net/php5-latest.tar.gz or download binaries for
Windows http://snaps.php.net/win32/php5-win32-latest.zip.
* a prerelease version downloadable from http://qa.php.net/.
* you have always the option to obtain PHP through anonymous CVS.
* you have always the option to obtain PHP through SVN.
These versions of PHP are compatible to Apache 2.0.40 and later.
@@ -1303,8 +1303,8 @@ Introduction to PECL Installations
When building PHP modules, it's important to have known-good versions
of the required tools (autoconf, automake, libtool, etc.) See the
Anonymous CVS Instructions for details on the required tools, and
required versions.
SVN Instructions for details on the required tools, and required
versions.
__________________________________________________________________
Downloading PECL extensions
@@ -1320,14 +1320,11 @@ Downloading PECL extensions
PECL extensions that have releases listed on the PECL web site are
available for download and installation using the pecl command.
Specific revisions may also be specified.
* CVS
Most PECL extensions also reside in CVS. A web-based view may be
seen at http://cvs.php.net/pecl/. To download straight from CVS,
the following sequence of commands may be used. Note that phpfi is
the password for user cvsread:
* SVN
All PECL files reside in SVN. A web-based view may be seen at
http://svn.php.net/pecl/. To download straight from SVN, use:
$ cvs -d:pserver:cvsread@cvs.php.net:/repository login
$ cvs -d:pserver:cvsread@cvs.php.net:/repository co pecl/extname
$ svn co http://svn.php.net/repository/pecl/<extname>/trunk <extname>
* Windows downloads
Windows users may find compiled PECL binaries by downloading the
+5 -11
View File
@@ -82,26 +82,21 @@ PHP_TEST_SHARED_EXTENSIONS = ` \
test: all
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -d extension_dir=modules/ $(PHP_TEST_SHARED_EXTENSIONS) tests/; \
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
INI_FILE=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r 'echo php_ini_loaded_file();' 2> /dev/null`; \
if test "$$INI_FILE"; then \
$(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
else \
echo > $(top_builddir)/tmp-php.ini; \
fi; \
INI_SCANNED_PATH=`$(top_builddir)/$(SAPI_CLI_PATH) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
INI_SCANNED_PATH=`$(PHP_EXECUTABLE) -d 'display_errors=stderr' -r '$$a = explode(",\n", trim(php_ini_scanned_files())); echo $$a[0];' 2> /dev/null`; \
if test "$$INI_SCANNED_PATH"; then \
INI_SCANNED_PATH=`$(top_srcdir)/build/shtool path -d $$INI_SCANNED_PATH`; \
$(EGREP) -h -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' "$$INI_SCANNED_PATH"/*.ini >> $(top_builddir)/tmp-php.ini; \
fi; \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
$(PHP_EXECUTABLE) -n -c $(top_builddir)/tmp-php.ini $(PHP_TEST_SETTINGS) $(top_srcdir)/run-tests.php -n -c $(top_builddir)/tmp-php.ini -d extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
@@ -115,9 +110,8 @@ clean:
rm -f libphp$(PHP_MAJOR_VERSION).la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/*
distclean: clean
rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
rm -f Makefile config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php5.spec sapi/apache/libphp$(PHP_MAJOR_VERSION).module buildmk.stamp
$(EGREP) define'.*include/php' $(top_srcdir)/configure | $(SED) 's/.*>//'|xargs rm -f
find . -name Makefile | xargs rm -f
.PHONY: all clean install distclean test
.NOEXPORT:
+477 -53
View File
@@ -1,27 +1,431 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
19 Feb 2009, PHP 5.2.9RC3
- Fixed bug #47422 (modulus operator returns incorrect results on 64 bit linux).
(Matt)
- Fixed bug #47399 (mb_check_encoding() returns true for some illegal SJIS
characters). (for-bugs at hnw dot jp, Moriyoshi)
- Fixed bug #47049 (SoapClient::__soapCall causes a segmentation fault).
(Dmitry)
- Fixed bug #45940 (MySQLI OO does not populate connect_error property on
failed connect). (Johannes)
- Fixed bug #45923 (mb_st[r]ripos() offset not handled correctly). (Moriyoshi)
- Fixed bug #45327 (memory leak if offsetGet throws exception). (Greg)
- Fixed bug #43841 (mb_strrpos() offset is byte count for negative values).
17 Dec 2009, PHP 5.2.12
- Added LIBXML_PARSEHUGE constant to overrides the maximum text size of a
single text node when using libxml2.7.3+. (Kalle)
- Added protection for $_SESSION from interrupt corruption and improved
"session.save_path" check. (Stas)
- Added "max_file_uploads" INI directive, which can be set to limit the
number of file uploads per-request to 20 by default, to prevent possible
DOS via temporary file exhaustion. (Ilia)
- Improved fix for bug #50006 (Segfault caused by uksort()). (Stas)
- Fixed error_log() to be binary safe when using message_type 3. (Jani)
- Fixed unnecessary invocation of setitimer when timeouts have been disabled.
(Arvind Srinivasan)
- Fixed crash in com_print_typeinfo when an invalid typelib is given.
(Pierre)
- Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak.
(Rasmus)
- Fixed a open_basedir bypass in posix_mkfifo() identified by Grzegorz
Stachowiak. (Rasmus)
- Fixed crash in SQLiteDatabase::ArrayQuery() and SQLiteDatabase::SingleQuery()
when calling using Reflection. (Felipe)
- Fixed crash when instantiating PDORow and PDOStatement through Reflection.
(Felipe)
- Fixed memory leak in openssl_pkcs12_export_to_file(). (Felipe)
- Updated timezone database to version 2009.19 (2009s). (Derick)
- Changed "post_max_size" php.ini directive to allow unlimited post size by
setting it to 0. (Rasmus)
- Fixed bug #50445 (PDO-ODBC stored procedure call from Solaris 64-bit causes
segfault). (davbrown4 at yahoo dot com, Felipe)
- Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
(Jani)
- Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN).
(Ilia, Pierrick)
- Fixed bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays).
(Felipe)
- Fixed bug #50282 (xmlrpc_encode_request() changes object into array in
calling function). (Felipe)
- Fixed bug #50266 (conflicting types for llabs). (Jani)
- Fixed bug #50255 (isset() and empty() silently casts array to object).
(Felipe)
- Fixed bug #50219 (soap call Segmentation fault on a redirected url).
(Pierrick)
- Fixed bug #50209 (Compiling with libedit cannot find readline.h).
(tcallawa at redhat dot com)
- Fixed bug #50207 (segmentation fault when concatenating very large strings
on 64bit linux). (Ilia)
- Fixed bug #50195 (pg_copy_to() fails when table name contains schema. (Ilia)
- Fixed bug #50185 (ldap_get_entries() return false instead of an empty array
when there is no error). (Jani)
- Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
- Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
non-existent file). (Dmitry)
- Fixed bug #50162 (Memory leak when fetching timestamp column from Oracle
database). (Felipe)
- Fixed bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses
containing = or ?). (Pierrick)
- Fixed bug #50073 (parse_url() incorrect when ? in fragment). (Ilia)
- Fixed bug #50006 (Segfault caused by uksort()). (Felipe)
- Fixed bug #50005 (Throwing through Reflection modified Exception object makes
segmentation fault). (Felipe)
- Fixed bug #49990 (SNMP3 warning message about security level printed twice).
(Jani)
- Fixed bug #49985 (pdo_pgsql prepare() re-use previous aborted transaction).
(ben dot pineau at gmail dot com, Ilia, Matteo)
- Fixed bug #49972 (AppendIterator undefined function crash). (Johannes)
- Fixed bug #49921 (Curl post upload functions changed). (Ilia)
- Fixed bug #49855 (import_request_variables() always returns NULL).
(Ilia, sjoerd at php dot net)
- Fixed bug #49847 (exec() fails to return data inside 2nd parameter, given
output lines >4095 bytes). (Ilia)
- Fixed bug #49809 (time_sleep_until() is not available on OpenSolaris). (Jani)
- Fixed bug #49785 (insufficient input string validation of htmlspecialchars()).
(Moriyoshi, hello at iwamot dot com)
- Fixed bug #49757 (long2ip() can return wrong value in a multi-threaded
applications). (Ilia, Florian Anderiasch)
- Fixed bug #49738 (calling mcrypt() after mcrypt_generic_deinit() crashes).
(Sriram Natarajan)
- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private
property in base class). (Felipe)
- Fixed bug #49698 (Unexpected change in strnatcasecmp()). (Rasmus)
- Fixed bug #49677 (ini parser crashes with apache2 and using ${something} ini
variables). (Jani)
- Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
- Fixed bug #49647 (DOMUserData does not exist). (Rob)
- Fixed bug #49630 (imap_listscan() function missing). (Felipe)
- Fixed bug #49627 (error_log to specified file does not log time according to
date.timezone). (Dmitry)
- Fixed bug #49578 (make install-pear fails). (Hannes)
- Fixed bug #49536 (mb_detect_encoding() returns incorrect results when
mbstring.strict_mode is turned on). (Moriyoshi)
- Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning "CURLPROTO_FILE
cannot be set"). (Felipe)
- Fixed bug #49528 (UTF-16 strings prefixed by BOMs wrongly converted).
(Moriyoshi)
- Fixed bug #49521 (PDO fetchObject sets values before calling constructor).
(Pierrick)
- Fixed bug #49517 (cURL's CURLOPT_FILE prevents file from being deleted after
fclose()). (Ilia)
- Fixed bug #49472 (Constants defined in Interfaces can be overridden).
(Felipe)
- Fixed bug #49354 (mb_strcut() cuts wrong length when offset is in the middle
of a multibyte character). (Moriyoshi)
- Fixed bug #49332 (Build error with Snow Leopard). (Scott)
- Fixed bug #49244 (Floating point NaN cause garbage characters). (Sjoerd)
- Fixed bug #49174 (crash when extending PDOStatement and trying to set
queryString property). (Felipe)
- Fixed bug #49098 (mysqli segfault on error). (Rasmus)
- Fixed bug #48805 (IPv6 socket transport is not working). (Ilia)
- Fixed bug #48764 (PDO_pgsql::query() always uses implicit prepared statements
if v3 proto available). (Matteo, Mark Kirkwood)
- Fixed bug #47848 (importNode doesn't preserve attribute namespaces). (Rob)
- Fixed bug #45120 (PDOStatement->execute() returns true then false for same
statement). (Pierrick)
- Fixed bug #34852 (Failure in odbc_exec() using oracle-supplied odbc driver).
(tim dot tassonis at trivadis dot com)
12 Feb 2009, PHP 5.2.9RC2
- Fixed bug #47353 (crash when creating a lot of objects in object destructor).
(Tony)
- Fixed bug #47322 (sscanf %d doesn't work). (Felipe)
- Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to decompress after
end of stream). (Greg)
02 Feb 2009, PHP 5.2.9RC1
17 Sep 2009, PHP 5.2.11
- Fixed certificate validation inside php_openssl_apply_verification_policy.
(Ryan Sleevi, Ilia)
- Updated timezone database to version 2009.13 (2009m) (Derick)
- Added missing sanity checks around exif processing. (Ilia)
- Fixed sanity check for the color index in imagecolortransparent. (Pierre)
- Fixed zlib.deflate compress filter to actually accept level parameter. (Jani)
- Fixed leak on error in popen/exec (and related functions) on Windows.
(Pierre)
- Fixed regression in cURL extension that prevented flush of data to output
defined as a file handle. (Ilia)
- Fixed memory leak in stream_is_local(). (Felipe, Tony)
- Fixed bug #49470 (FILTER_SANITIZE_EMAIL allows disallowed characters). (Ilia)
- Fixed bug #49447 (php engine needs to correctly check for socket API return
status on windows). (Sriram Natarajan)
- Fixed bug #49372 (segfault in php_curl_option_curl). (Pierre)
- Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries).
(Ilia, code-it at mail dot ru)
- Fixed bug #49289 (bcmath module doesn't compile with phpize configure).
(Jani)
- Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani)
- Fixed bug #49269 (Ternary operator fails on Iterator object when used
inside foreach declaration). (Etienne, Dmitry)
- Fixed bug #49236 (Missing PHP_SUBST(PDO_MYSQL_SHARED_LIBADD)). (Jani)
- Fixed bug #49144 (Import of schema from different host transmits original
authentication details). (Dmitry)
- Fixed bug #49132 (posix_times returns false without error).
(phpbugs at gunnu dot us)
- Fixed bug #49125 (Error in dba_exists C code). (jdornan at stanford dot edu)
- Fixed bug #49095 (proc_get_status['exitcode'] fails on win32). (Felipe)
- Fixed bug #49074 (private class static fields can be modified by using
reflection). (Jani)
- Fixed bug #49072 (feof never returns true for damaged file in zip).
(Pierre)
- Fixed bug #49052 (context option headers freed too early when using
--with-curlwrappers). (Jani)
- Fixed bug #49032 (SplFileObject::fscanf() variables passed by reference).
(Jani)
- Fixed bug #49026 (proc_open() can bypass safe_mode_protected_env_vars
restrictions). (Ilia)
- Fixed bug #49000 (PHP CLI in Interactive mode (php -a) crashes when
including files from function). (Stas)
- Fixed bug #48994 (zlib.output_compression does not output HTTP headers
when set to a string value). (Jani)
- Fixed bug #48980 (Crash when compiling with pdo_firebird). (Felipe)
- Fixed bug #48962 (cURL does not upload files with specified filename). (Ilia)
- Fixed bug #48929 (Double \r\n after HTTP headers when "header" context
option is an array). (David Zülke)
- Fixed bug #48913 (Too long error code strings in pdo_odbc driver).
(naf at altlinux dot ru, Felipe)
- Fixed bug #48802 (printf() returns incorrect outputted length). (Jani)
- Fixed bug #48801 (Problem with imagettfbbox). (Takeshi Abe)
- Fixed bug #48788 (RecursiveDirectoryIterator doesn't descend into
symlinked directories). (Ilia)
- Fixed bug #48774 (SIGSEGVs when using curl_copy_handle()). (Sriram Natarajan)
- Fixed bug #48763 (ZipArchive produces corrupt archive).
(dani dot church at gmail dot com, Pierre)
- Fixed bug #48762 (IPv6 address filter still rejects valid address). (Felipe)
- Fixed bug #48733 (CURLOPT_WRITEHEADER|CURLOPT_FILE|CURLOPT_STDERR warns on
files that have been opened with r+). (Ilia)
- Fixed bug #48732 (TTF Bounding box wrong for letters below baseline).
(Takeshi Abe)
- Fixed bug #48718 (FILTER_VALIDATE_EMAIL does not allow numbers in domain
components). (Ilia)
- Fixed bug #48709 (metaphone and 'wh'). (brettz9 at yahoo dot com, Felipe)
- Fixed bug #48697 (mb_internal_encoding() value gets reset by parse_str()).
(Moriyoshi)
- Fixed bug #48696 (ldap_read() segfaults with invalid parameters). (Felipe)
- Fixed bug #48693 (Double declaration of __lambda_func when lambda wrongly
formatted). (peter at lvp-media dot com, Felipe)
- Fixed bug #48661 (phpize is broken with non-bash shells). (Jani)
- Fixed bug #48645 (mb_convert_encoding() doesn't understand hexadecimal
html-entities). (Moriyoshi)
- Fixed bug #48637 ("file" fopen wrapper is overwritten when using
--with-curlwrappers). (Jani)
- Fixed bug #48636 (Error compiling of ext/date on netware).
(guenter at php.net, Ilia)
- Fixed bug #48629 (get_defined_constants() ignores categorize parameter).
(Felipe)
- Fixed bug #48619 (imap_search ALL segfaults). (Pierre)
- Fixed bug #48608 (Invalid libreadline version not detected during
configure). (Jani)
- Fixed bug #48555 (ImageFTBBox() differs from previous versions for texts with
new lines) (Takeshi Abe)
- Fixed bug #48539 (pdo_dblib fails to connect, throws empty PDOException
"SQLSTATE[] (null)"). (Felipe)
- Fixed bug #48465 (sys_get_temp_dir() possibly inconsistent when using TMPDIR).
(Ilia)
- Fixed bug #48450 (Compile failure under IRIX 6.5.30 building gd.c). (Kalle)
- Fixed bug #48400 (imap crashes when closing stream opened with OP_PROTOTYPE
flag). (Jani)
- Fixed bug #48284 (hash "adler32" byte order is reversed). (Scott)
- Fixed bug #48276 (date("Y") on big endian machines produces the wrong
result). (Scott)
- Fixed bug #48247 (Infinite loop and possible crash during startup with
errors when errors are logged). (Jani)
- Fixed bug #48182 (ssl handshake fails during asynchronous socket connection).
(Sriram Natarajan)
- Fixed bug #48116 (Fixed build with Openssl 1.0).
(Pierre, Al dot Smith at aeschi dot ch dot eu dot org)
- Fixed bug #48060 (pdo_pgsql - large objects are returned as empty). (Matteo)
- Fixed bug #48057 (Only the date fields of the first row are fetched,
others are empty). (info at programmiernutte dot net)
- Fixed bug #47481 (natcasesort() does not sort extended ASCII characters
correctly). (Herman Radtke)
- Fixed bug #47351 (Memory leak in DateTime). (Derick, Tobias John)
- Fixed bug #47273 (Encoding bug in SoapServer->fault). (Dmitry)
- Fixed bug #46020 (with Sun Java System Web Server 7.0 on HPUX, #define HPUX).
(Uwe Schindler)
- Fixed bug #45905 (imagefilledrectangle() clipping error).
(markril at hotmail dot com, Pierre)
- Fixed bug #45280 (Reflection of instantiated COM classes causes PHP to
crash). (Paul Richards, Kalle)
- Fixed bug #45141 (setcookie will output expires years of >4 digits). (Ilia)
- Fixed bug #44683 (popen crashes when an invalid mode is passed). (Pierre)
- Fixed bug #44144 (spl_autoload_functions() should return object instance
when appropriate). (Hannes, Etienne)
- Fixed bug #43510 (stream_get_meta_data() does not return same mode as used in
fopen). (Jani)
- Fixed bug #42434 (ImageLine w/ antialias = 1px shorter).
(wojjie at gmail dot com, Kalle)
- Fixed bug #28038 (Sent incorrect RCPT TO commands to SMTP server) (Garrett)
- Fixed bug #49572 (use of C++ style comments causes build failure).
(Sriram Natarajan)
17 Jun 2009, PHP 5.2.10
- Added "ignore_errors" option to http fopen wrapper. (David Zulke, Sara)
- Added new CURL options CURLOPT_REDIR_PROTOCOLS, CURLOPT_PROTOCOLS,
and CURLPROTO_* for redirect fixes in CURL 7.19.4. (Yoram Bar Haim, Stas)
- Added support for Sun CC (FR #46595 and FR #46513). (David Soria Parra)
- Changed default value of array_unique()'s optional sorting type parameter
back to SORT_STRING to fix backwards compatibility breakage introduced in
PHP 5.2.9. (Moriyoshi)
- Fixed memory corruptions while reading properties of zip files. (Ilia)
- Fixed memory leak in ob_get_clean/ob_get_flush. (Christian)
- Fixed segfault on invalid session.save_path. (Hannes)
- Fixed leaks in imap when a mail_criteria is used. (Pierre)
- Fixed missing erealloc() in fix for Bug #40091 in spl_autoload_register. (Greg)
- Fixed bug #48562 (Reference recursion causes segfault when used in
wddx_serialize_vars()). (Felipe)
- Fixed bug #48557 (Numeric string keys in Apache Hashmaps are not cast to
integers). (David Zuelke)
- Fixed bug #48518 (curl crashes when writing into invalid file handle). (Tony)
- Fixed bug #48514 (cURL extension uses same resource name for simple and
multi APIs). (Felipe)
- Fixed bug #48469 (ldap_get_entries() leaks memory on empty search
results). (Patrick)
- Fixed bug #48456 (CPPFLAGS not restored properly in phpize.m4). (Jani,
spisek at kerio dot com)
- Fixed bug #48448 (Compile failure under IRIX 6.5.30 building cast.c).
(Kalle)
- Fixed bug #48441 (ldap_search() sizelimit, timelimit and deref options
persist). (Patrick)
- Fixed bug #48434 (Improve memory_get_usage() accuracy). (Arnaud)
- Fixed bug #48416 (Force a cache limit in ereg() to stop excessive memory
usage). (Scott)
- Fixed bug #48409 (Crash when exception is thrown while passing function
arguments). (Arnaud)
- Fixed bug #48378 (exif_read_data() segfaults on certain corrupted .jpeg
files). (Pierre)
- Fixed bug #48359 (Script hangs on snmprealwalk if OID is not increasing).
(Ilia, simonov at gmail dot com)
- Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not work
with redeclared property).
(patch by Markus dot Lidel at shadowconnect dot com)
- Fixed bug #48326 (constant MSG_DONTWAIT not defined). (Arnaud)
- Fixed bug #48313 (fgetcsv() does not return null for empty rows). (Ilia)
- Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not update
stream position of plain files). (Arnaud)
- Fixed bug #48307 (stream_copy_to_stream() copies 0 bytes when $source is a
socket). (Arnaud)
- Fixed bug #48273 (snmp*_real_walk() returns SNMP errors as values).
(Ilia, lytboris at gmail dot com)
- Fixed bug #48256 (Crash due to double-linking of history.o).
(tstarling at wikimedia dot org)
- Fixed bug #48248 (SIGSEGV when access to private property via &__get).
(Felipe)
- Fixed bug #48247 (Crash on errors during startup). (Stas)
- Fixed bug #48240 (DBA Segmentation fault dba_nextkey). (Felipe)
- Fixed bug #48224 (Incorrect shuffle in array_rand). (Etienne)
- Fixed bug #48221 (memory leak when passing invalid xslt parameter).
(Felipe)
- Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out when
working with a non-writable stream). (Ilia)
- Fixed bug #48206 (Iterating over an invalid data structure with
RecursiveIteratorIterator leads to a segfault). (Scott)
- Fixed bug #48204 (xmlwriter_open_uri() does not emit warnings on invalid
paths). (Ilia)
- Fixed bug #48203 (Crash when CURLOPT_STDERR is set to regular file). (Jani)
- Fixed bug #48202 (Out of Memory error message when passing invalid file
path) (Pierre)
- Fixed bug #48156 (Added support for lcov v1.7). (Ilia)
- Fixed bug #48132 (configure check for curl ssl support fails with
--disable-rpath). (Jani)
- Fixed bug #48131 (Don't try to bind ipv4 addresses to ipv6 ips via bindto).
(Ilia)
- Fixed bug #48070 (PDO_OCI: Segfault when using persistent connection).
(Pierre, Matteo, jarismar dot php at gmail dot com)
- Fixed bug #48058 (Year formatter goes wrong with out-of-int range). (Derick)
- Fixed bug #48038 (odbc_execute changes variables used to form params array).
(Felipe)
- Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams). (Arnaud)
- Fixed bug #47991 (SSL streams fail if error stack contains items). (Mikko)
- Fixed bug #47981 (error handler not called regardless). (Hannes)
- Fixed bug #47969 (ezmlm_hash() returns different values depend on OS). (Ilia)
- Fixed bug #47946 (ImageConvolution overwrites background). (Ilia)
- Fixed bug #47940 (memory leaks in imap_body). (Pierre, Jake Levitt)
- Fixed bug #47937 (system() calls sapi_flush() regardless of output
buffering). (Ilia)
- Fixed bug #47903 ("@" operator does not work with string offsets). (Felipe)
- Fixed bug #47893 (CLI aborts on non blocking stdout). (Arnaud)
- Fixed bug #47849 (Non-deep import loses the namespace). (Rob)
- Fixed bug #47845 (PDO_Firebird omits first row from query). (Lars W)
- Fixed bug #47836 (array operator [] inconsistency when the array has
PHP_INT_MAX index value). (Matt)
- Fixed bug #47831 (Compile warning for strnlen() in main/spprintf.c).
(Ilia, rainer dot jung at kippdata dot de)
- Fixed bug #47828 (openssl_x509_parse() segfaults when a UTF-8 conversion
fails). (Scott, Kees Cook, Pierre)
- Fixed bug #47818 (Segfault due to bound callback param). (Felipe)
- Fixed bug #47801 (__call() accessed via parent:: operator is provided
incorrect method name). (Felipe)
- Fixed bug #47769 (Strange extends PDO). (Felipe)
- Fixed bug #47745 (FILTER_VALIDATE_INT doesn't allow minimum integer).
(Dmitry)
- Fixed bug #47721 (Alignment issues in mbstring and sysvshm extension).
(crrodriguez at opensuse dot org, Ilia)
- Fixed bug #47704 (PHP crashes on some "bad" operations with string
offsets). (Dmitry)
- Fixed bug #47695 (build error when xmlrpc and iconv are compiled against
different iconv versions). (Scott)
- Fixed bug #47667 (ZipArchive::OVERWRITE seems to have no effect).
(Mikko, Pierre)
- Fixed bug #47644 (Valid integers are truncated with json_decode()). (Scott)
- Fixed bug #47639 (pg_copy_from() WARNING: nonstandard use of \\ in a
string literal). (Ilia)
- Fixed bug #47616 (curl keeps crashing). (Felipe)
- Fixed bug #47598 (FILTER_VALIDATE_EMAIL is locale aware). (Ilia)
- Fixed bug #47566 (pcntl_wexitstatus() returns signed status).
(patch by james at jamesreno dot com)
- Fixed bug #47564 (unpacking unsigned long 32bit bit endian returns wrong
result). (Ilia)
- Fixed bug #47487 (performance degraded when reading large chunks after
fix of bug #44607). (Arnaud)
- Fixed bug #47468 (enable cli|cgi-only extensions for embed sapi). (Jani)
- Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6
addresses in the filter extension). (Ilia)
- Fixed bug #47430 (Errors after writing to nodeValue parameter of an absent
previousSibling). (Rob)
- Fixed bug #47365 (ip2long() may allow some invalid values on certain 64bit
systems). (Ilia)
- Fixed bug #47254 (Wrong Reflection for extends class). (Felipe)
- Fixed bug #47042 (cgi sapi is incorrectly removing SCRIPT_FILENAME).
(Sriram Natarajan, David Soria Parra)
- Fixed bug #46882 (Serialize / Unserialize misbehaviour under OS with
different bit numbers). (Matt)
- Fixed bug #46812 (get_class_vars() does not include visible private variable
looking at subclass). (Arnaud)
- Fixed bug #46386 (Digest authentication with SOAP module fails against MSSQL
SOAP services). (Ilia, lordelph at gmail dot com)
- Fixed bug #46109 (Memory leak when mysqli::init() is called multiple times).
(Andrey)
- Fixed bug #45997 (safe_mode bypass with exec/system/passthru (windows only)).
(Pierre)
- Fixed bug #45877 (Array key '2147483647' left as string). (Matt)
- Fixed bug #45822 (Near infinite-loops while parsing huge relative offsets).
(Derick, Mike Sullivan)
- Fixed bug #45799 (imagepng() crashes on empty image).
(Martin McNickle, Takeshi Abe)
- Fixed bug #45622 (isset($arrayObject->p) misbehaves with
ArrayObject::ARRAY_AS_PROPS set). (robin_fernandes at uk dot ibm dot com, Arnaud)
- Fixed bug #45614 (ArrayIterator::current(), ::key() can show 1st private prop
of wrapped object). (robin_fernandes at uk dot ibm dot com, Arnaud)
- Fixed bug #45540 (stream_context_create creates bad http request). (Arnaud)
- Fixed bug #45202 (zlib.output_compression can not be set with ini_set()).
(Jani)
- Fixed bug #45191 (error_log ignores date.timezone php.ini val when setting
logging timestamps). (Derick)
- Fixed bug #45092 (header HTTP context option not being used when compiled
using --with-curlwrappers). (Jani)
- Fixed bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime).
(Ilia, kawai at apache dot org)
- Fixed bug #44827 (define() is missing error checks for class constants).
(Ilia)
- Fixed bug #44214 (Crash using preg_replace_callback() and global variables).
(Nuno, Scott)
- Fixed bug #43073 (TrueType bounding box is wrong for angle<>0).
(Martin McNickle)
- Fixed bug #42663 (gzinflate() try to allocate all memory with truncated
data). (Arnaud)
- Fixed bug #42414 (some odbc_*() functions incompatible with Oracle ODBC
driver). (jhml at gmx dot net)
- Fixed bug #42362 (HTTP status codes 204 and 304 should not be gzipped).
(Scott, Edward Z. Yang)
- Fixed bug #42143 (The constant NAN is reported as 0 on Windows)
(Kanwaljeet Singla, Venkat Raman Don)
- Fixed bug #38805 (PDO truncates text from SQL Server text data type field).
(Steph)
26 Feb 2009, PHP 5.2.9
- Changed __call() to be invoked on private/protected method access, similar to
properties and __get(). (Andrei)
@@ -40,11 +444,17 @@ PHP NEWS
- Fixed bug in xml_error_string() which resulted in messages being
off by one. (Scott)
- Fixed bug #47422 (modulus operator returns incorrect results on 64 bit
linux). (Matt)
- Fixed bug #47399 (mb_check_encoding() returns true for some illegal SJIS
characters). (for-bugs at hnw dot jp, Moriyoshi)
- Fixed bug #47353 (crash when creating a lot of objects in object
destructor). (Tony)
- Fixed bug #47322 (sscanf %d doesn't work). (Felipe)
- Fixed bug #47282 (FILTER_VALIDATE_EMAIL is marking valid email addresses
as invalid). (Ilia)
- Fixed bug #47220 (segfault in dom_document_parser in recovery mode). (Rob)
- Fixed bug #47217 (content-type is not set properly for file uploads).
(Ilia)
- Fixed bug #47217 (content-type is not set properly for file uploads). (Ilia)
- Fixed bug #47174 (base64_decode() interprets pad char in mid string as
terminator). (Ilia)
- Fixed bug #47165 (Possible memory corruption when passing return value by
@@ -52,53 +462,66 @@ PHP NEWS
- Fixed bug #47152 (gzseek/fseek using SEEK_END produces strange results).
(Felipe)
- Fixed bug #47131 (SOAP Extension ignores "user_agent" ini setting). (Ilia)
- Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
- Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object).
(Etienne, Dmitry)
- Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
- Fixed bug #47049 (SoapClient::__soapCall causes a segmentation fault).
(Dmitry)
- Fixed bug #47048 (Segfault with new pg_meta_data). (Felipe)
- Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache).
(Sriram Natarajan)
- Fixed bug #47037 (No error when using fopen with empty string).
(Cristian Rodriguez R., Felipe)
- Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a TXT
record). (Felipe)
- Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non
apache). (Sriram Natarajan)
- Fixed bug #47037 (No error when using fopen with empty string). (Cristian
Rodriguez R., Felipe)
- Fixed bug #47035 (dns_get_record returns a garbage byte at the end of a
TXT record). (Felipe)
- Fixed bug #47027 (var_export doesn't show numeric indices on ArrayObject).
(Derick)
- Fixed bug #46985 (OVERWRITE and binary mode does not work, regression introduced in
5.2.8). (Pierre)
- Fixed bug #46985 (OVERWRITE and binary mode does not work, regression
introduced in 5.2.8). (Pierre)
- Fixed bug #46973 (IPv6 address filter rejects valid address). (Felipe)
- Fixed bug #46964 (Fixed pdo_mysql build with older version of MySQL). (Ilia)
- Fixed bug #46959 (Unable to disable PCRE). (Scott)
- Fixed bug #46918 (imap_rfc822_parse_adrlist host part not filled in correctly).
(Felipe)
- Fixed bug #46918 (imap_rfc822_parse_adrlist host part not filled in
correctly). (Felipe)
- Fixed bug #46889 (Memory leak in strtotime()). (Derick)
- Fixed bug #46887 (Invalid calls to php_error_docref()).
(oeriksson at mandriva dot com, Ilia)
- Fixed bug #46887 (Invalid calls to php_error_docref()). (oeriksson at
mandriva dot com, Ilia)
- Fixed bug #46873 (extract($foo) crashes if $foo['foo'] exists). (Arnaud)
- Fixed bug #46843 (CP936 euro symbol is not converted properly).
(ty_c at cybozuy dot co dot jp, Moriyoshi)
- Fixed bug #46843 (CP936 euro symbol is not converted properly). (ty_c at
cybozuy dot co dot jp, Moriyoshi)
- Fixed bug #46798 (Crash in mssql extension when retrieving a NULL value
inside a binary or image column type). (Ilia)
- Fixed bug #46782 (fastcgi.c parse error). (Matt)
- Fixed bug #46760 (SoapClient doRequest fails when proxy is used). (Felipe)
- Fixed bug #46748 (Segfault when an SSL error has more than one error). (Scott)
- Fixed bug #46739 (array returned by curl_getinfo should contain content_type key).
(Mikko)
- Fixed bug #46748 (Segfault when an SSL error has more than one error).
(Scott)
- Fixed bug #46739 (array returned by curl_getinfo should contain
content_type key). (Mikko)
- Fixed bug #46699 (xml_parse crash when parser is namespace aware). (Rob)
- Fixed bug #46419 (Elements of associative arrays with NULL value are lost).
(Dmitry)
- Fixed bug #46419 (Elements of associative arrays with NULL value are
lost). (Dmitry)
- Fixed bug #46282 (Corrupt DBF When Using DATE). (arne at bukkie dot nl)
- Fixed bug #46005 (User not consistently logged under Apache2).
(admorten at umich dot edu, Stas)
- Fixed bug #45996 (libxml2 2.7 causes breakage with character data
in xml_parse()). (Rob)
- Fixed bug #46026 (bz2.decompress/zlib.inflate filter tries to decompress
after end of stream). (Greg)
- Fixed bug #46005 (User not consistently logged under Apache2). (admorten
at umich dot edu, Stas)
- Fixed bug #45996 (libxml2 2.7 causes breakage with character data in
xml_parse()). (Rob)
- Fixed bug #45940 (MySQLI OO does not populate connect_error property on
failed connect). (Johannes)
- Fixed bug #45923 (mb_st[r]ripos() offset not handled correctly). (Moriyoshi)
- Fixed bug #45327 (memory leak if offsetGet throws exception). (Greg)
- Fixed bug #45239 (Encoding detector hangs with mbstring.strict_detection
enabled). (Moriyoshi)
- Fixed bug #45161 (Reusing a curl handle leaks memory). (Mark Karpeles, Jani)
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance).
(frode at coretrek dot com, Nuno)
- Fixed bug #35975 (Session cookie expires date format isn't the most compatible.
Now matches that of setcookie()). (Scott)
- Fixed bug #44336 (Improve pcre UTF-8 string matching performance). (frode
at coretrek dot com, Nuno)
- Fixed bug #43841 (mb_strrpos() offset is byte count for negative values).
(Moriyoshi)
- Fixed bug #37209 (mssql_execute with non fatal errors). (Kalle)
- Fixed bug #35975 (Session cookie expires date format isn't the most
compatible. Now matches that of setcookie()). (Scott)
08 Dec 2008, PHP 5.2.8
- Reverted bug fix #42718 that broke magic_quotes_gpc (Scott)
@@ -115,6 +538,9 @@ PHP NEWS
either disable or change the compile time ini scan directory (FR #45114).
(Jani)
- Reverted fix for bug #44197 due to behaviour change in minor version.
(Felipe)
- Fixed missing initialization of BG(page_uid) and BG(page_gid),
reported by Maksymilian Arciemowicz. (Stas)
- Fixed memory leak inside sqlite_create_aggregate(). (Felipe)
@@ -160,8 +586,6 @@ PHP NEWS
attribute.(Scott)
- Fixed a crash on invalid method in ReflectionParameter constructor.
(Christian Seiler)
- Reverted fix for bug #44197 due to behaviour change in minor version.
(Felipe)
- Fixed bug #46732 (mktime.year description is wrong). (Derick)
- Fixed bug #46696 (cURL fails in upload files with specified content-type).
@@ -294,7 +718,6 @@ PHP NEWS
(Kalle, oleg dot grenrus at dynamoid dot com)
- Fixed bug #45405 (snmp extension memory leak).
(Federico Cuello, Rodrigo Campos)
- Fixed bug #45392 (ob_start()/ob_end_clean() and memory_limit). (Arnaud)
- Fixed bug #45382 (timeout bug in stream_socket_enable_crypto). (Ilia)
- Fixed bug #45373 (php crash on query with errors in params). (Felipe)
- Fixed bug #45352 (Segmentation fault because of tick function on second
@@ -410,6 +833,8 @@ PHP NEWS
01 May 2008, PHP 5.2.6
- Upgraded PCRE to version 7.6 (Nuno)
- Fixed two possible crashes inside posix extension (Tony)
- Fixed incorrect heredoc handling when label is used within the block.
(Matt)
@@ -429,7 +854,6 @@ PHP NEWS
- Fixed segfault in filter extension when using callbacks. (Arnar Mar Sig,
Felipe)
- Fixed faulty fix for bug #40189 (endless loop in zlib.inflate stream filter). (Greg)
- Upgraded PCRE to version 7.6 (Nuno)
- Fixed bug #44742 (timezone_offset_get() causes segmentation faults). (Derick)
- Fixed bug #44720 (Prevent crash within session_register()). (Scott)
+10 -30
View File
@@ -8,11 +8,11 @@ part is making it acceptable for inclusion into our repository. :-)
How to create patch?
--------------------
We are working with CVS. You need to get CVS source to create a patch
that we accept. Visit http://www.php.net/anoncvs.php to get CVS
source. You can check out older versions, but make sure you get
the default branch (i.e. Do not use -r option when you check out the
CVS source)
We use Subversion (SVN) for revision control. You need to get the
source from SVN in order to create a patch. Read
http://www.php.net/svn.php for help on using SVN. You can check out
older branches, but make sure you get trunk as well and make your
patch work there.
Read CODING_STANDARDS file before you start working.
@@ -21,7 +21,7 @@ add a new feature to PHP. After you finished editing, please test your
patch. Read README.TESTING for testing.
After you finish testing your patch, take diff file using
"cvs diff > your.patch" command.
"svn diff > your.patch" command.
Read README.TESTING for submitting a test script for your patch. This is
not strictly required, but it is preferred to submit a test script along
@@ -41,25 +41,8 @@ maintainer and/or internals@lists.php.net, or pear-dev@lists.php.net if
you are patching PEAR. Official module maintainers can be found in
EXTENSIONS file in PHP source.
If you are new to CVS (Concurrent Versions System), visit
http://cvshome.org/ for details.
Recommended CVS client settings for creating patch file
------------------------------------------------------
Recommended ~/.cvsrc file setting is:
------
cvs -z3
update -d -P
checkout -P
diff -u
------
diff -u means:
-u Use the unified output format.
With this CVS setting, you don't have to worry about adding/deleting
newlines and spaces.
If you are new to SVN (Subversion), visit
http://svnbook.red-bean.com/ for details.
Check list for submitting patch
@@ -70,10 +53,7 @@ Check list for submitting patch
web server error logs when you test your patch?
- Did you build PHP for multi-threaded web servers. (Optional)
- Did you create test script for "make test"? (Recommended)
- Did you check your patch is unified format and it does not
contain white space changes? (If you are not using recommended
cvs setting)
- Did you update CVS source before you take final patch?
- Did you update SVN source before you take final patch?
- Did you read the patch again?
@@ -118,7 +98,7 @@ these questions:
What happens when your patch is applied?
----------------------------------------
Your name will be included together with your email address in the CVS
Your name will be included together with your email address in the SVN
commit log. If your patch affects end-users, a brief description
and your name might be added to the NEWS file.
+62 -41
View File
@@ -1,24 +1,31 @@
This is the first file you should be reading after you get your CVS account.
We'll assume you're basically familiar with CVS, but feel free to post
your questions on the mailing list. Please have a look at
http://cvsbook.red-bean.com/ for more detailed information on CVS.
====================
SVN Commit Rules
====================
This is the first file you should be reading after you get your SVN account.
We'll assume you're basically familiar with SVN, but feel free to post
your questions on the mailing list. Please have a look at
http://svnbook.red-bean.com/ for more detailed information on SVN.
PHP is developed through the efforts of a large number of people.
Collaboration is a Good Thing(tm), and CVS lets us do this. Thus, following
some basic rules with regards to CVS usage will:
Collaboration is a Good Thing(tm), and SVN lets us do this. Thus, following
some basic rules with regards to SVN usage will::
a. Make everybody happier, especially those responsible for maintaining
the CVS itself.
the SVN itself.
b. Keep the changes consistently well documented and easily trackable.
c. Prevent some of those 'Oops' moments.
d. Increase the general level of good will on planet Earth.
Having said that, here are the organizational rules:
Having said that, here are the organizational rules::
1. Respect other people working on the project.
2. Discuss any significant changes on the list before committing.
2. Discuss any significant changes on the list before committing and get
confirmation from the release manager for the given branch.
3. Look at EXTENSIONS file to see who is the primary maintainer of
the code you want to contribute to.
@@ -30,45 +37,54 @@ Having said that, here are the organizational rules:
6. Test your changes before committing them. We mean it. Really.
To do so use "make test".
7. For development use the --enable-maintainer-zts switch to ensure your
code handles TSRM correctly and doesn't break for thos who need that.
Currently we have the following branches in use:
HEAD Will become PHP 6.0. This CVS branch is for active development.
PHP_5_2 Is used to release the PHP 5.2.x series. Only minor feature
enhancements may go in here, but please keep that as infrequent as
possible.
PHP_5_1 This branch is closed.
PHP_4_4 Is used to release the PHP 4.4.x series. Only bugfixes are permitted
on this branch (Consult the releasemaster prior to commit).
PHP_4_3 This branch is closed.
Currently we have the following branches in use::
The next few rules are more of a technical nature.
trunk Will become PHP 6.0. This CVS branch is for active development.
1. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
branches/PHP_5_3 Is used to release the PHP 5.3.x series. It still allows for
larger enhancements.
branches/PHP_5_2 Is used to release the PHP 5.2.x series. Only bugfixes are permitted
on this branch (Consult the releasemaster prior to commit).
branches/PHP_5_1 This branch is closed.
branches/PHP_4_4 This branch is closed.
The next few rules are more of a technical nature::
1. All changes should first go to trunk and then get merged from trunk
(aka MFH'ed) to all other relevant branches.
2. DO NOT TOUCH ChangeLog! It is automagically updated from the commit
messages every day. Woe be to those who attempt to mess with it.
2. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file.
3. All news updates intended for public viewing, such as new features,
bug fixes, improvements, etc., should go into the NEWS file of the
*first* to be released version with the given change. In other words
any NEWS file change only needs to done in one branch.
NB! Lines, starting with @ will go automagically into NEWS file, but
this is NOT recommended, though. Please, add news entries directly to
this is NOT recommended, though. Please, add news entries directly to
NEWS file and don't forget to keep them adjusted and sorted.
3. Do not commit multiple file and dump all messages in one commit. If you
4. Do not commit multiple file and dump all messages in one commit. If you
modified several unrelated files, commit each group separately and
provide a nice commit message for each one. See example below.
4. Do write your commit message in such a way that it makes sense even
5. Do write your commit message in such a way that it makes sense even
without the corresponding diff. One should be able to look at it, and
immediately know what was modified. Definitely include the function name
in the message as shown below.
5. In your commit messages, keep each line shorter than 80 characters. And
6. In your commit messages, keep each line shorter than 80 characters. And
try to align your lines vertically, if they wrap. It looks bad otherwise.
6. If you modified a function that is callable from PHP, prepend PHP to
7. If you modified a function that is callable from PHP, prepend PHP to
the function name as shown below.
@@ -80,7 +96,7 @@ If a line begins with #, it is taken to be a comment and will not appear
in the ChangeLog. Everything else goes into the ChangeLog.
It is important to note that if your comment or news logline spans multiple
lines, you have to put # at the beginning of _every_ such line.
lines, you have to put # at the beginning of **every** such line.
Example. Say you modified two files, datetime.c and string.c. In datetime.c you
added a new format option for the date() function, and in string.c you fixed a
@@ -88,13 +104,15 @@ memory leak in php_trim(). Don't commit both of these at once. Commit them
separately and try to make sure your commit messages look something like the
following.
For datetime.c:
- Added new 'K' format modifier to date() for printing out number of days until
New Year's Eve.
For datetime.c::
For string.c:
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
#- Man, that thing was leaking all over the place!
- Added new 'K' format modifier to date() for printing out number of days
until New Year's Eve.
For string.c::
- Fixed a memory leak in php_trim() resulting from improper use of zval_dtor().
#- Man, that thing was leaking all over the place!
The # lines will be omitted from the ChangeLog automagically.
@@ -106,16 +124,19 @@ If you fix some bugs, you should note the bug ID numbers in your
commit message. Bug ID should be prefixed by "#" for easier access to
bug report when developers are browsing CVS via LXR or Bonsai.
Example:
Example::
Fixed bug #14016 (pgsql notice handler double free crash bug.)
Fixed bug #14016 (pgsql notice handler double free crash bug.)
If you don't see your messages in ChangeLog right away, don't worry!
These files are updated once a day, so your stuff will not show up until
somewhat later.
somewhat later.
When you change the NEWS file for a bug fix, then please keep the bugs
sorted in decreasing order under the fixed version.
You can use LXR (http://lxr.php.net/) and Bonsai (http://bonsai.php.net/)
to look at PHP CVS repository in various ways.
to look at PHP SVN repository in various ways.
To receive daily updates to ChangeLog and NEWS, send an empty message to
php-cvs-daily-subscribe@lists.php.net.
+5 -4
View File
@@ -32,11 +32,12 @@ sapi/cli/php [-c /path/to/php.ini] run-tests.php [ext/foo/tests/GLOB]
[Which "php" executable "make test" look for]
---------------------------------------------
You must use TEST_PHP_EXECUTABLE environment variable to explicitly
select the php executable to be used to run the tests. That can either
be the CLI or CGI executable.
If you are running the run-tests.php script from the command line (as above)
you must set the TEST_PHP_EXECUTABLE environment variable to explicitly
select the PHP executable that is to be tested, that is, used to run the test scripts.
"make test" executes "run-tests.php" script with "php" binary. Some
If you run the tests using make test, the PHP CLI and CGI executables are
automatically set for you. "make test" executes "run-tests.php" script with the CLI binary. Some
test scripts such as session must be executed by CGI SAPI. Therefore,
you must build PHP with CGI SAPI to perform all tests.
+24 -4
View File
@@ -179,20 +179,39 @@ TSRM_API FILE *popen(const char *command, const char *type)
TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env)
{
FILE *stream = NULL;
int fno, str_len = strlen(type), read, mode;
int fno, type_len = strlen(type), read, mode;
STARTUPINFO startup;
PROCESS_INFORMATION process;
SECURITY_ATTRIBUTES security;
HANDLE in, out;
char *cmd;
process_pair *proc;
char *cmd;
int i;
char *ptype = (char *)type;
TSRMLS_FETCH();
if (!type) {
return NULL;
}
/*The following two checks can be removed once we drop XP support */
type_len = strlen(type);
if (type_len <1 || type_len > 2) {
return NULL;
}
for (i=0; i < type_len; i++) {
if (!(*ptype == 'r' || *ptype == 'w' || *ptype == 'b' || *ptype == 't')) {
return NULL;
}
ptype++;
}
security.nLength = sizeof(SECURITY_ATTRIBUTES);
security.bInheritHandle = TRUE;
security.lpSecurityDescriptor = NULL;
if (!str_len || !CreatePipe(&in, &out, &security, 2048L)) {
if (!type_len || !CreatePipe(&in, &out, &security, 2048L)) {
return NULL;
}
@@ -204,7 +223,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
startup.hStdError = GetStdHandle(STD_ERROR_HANDLE);
read = (type[0] == 'r') ? TRUE : FALSE;
mode = ((str_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
mode = ((type_len == 2) && (type[1] == 'b')) ? O_BINARY : O_TEXT;
if (read) {
@@ -220,6 +239,7 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd,
cmd = (char*)malloc(strlen(command)+strlen(TWG(comspec))+sizeof(" /c "));
sprintf(cmd, "%s /c %s", TWG(comspec), command);
if (!CreateProcess(NULL, cmd, &security, &security, security.bInheritHandle, NORMAL_PRIORITY_CLASS|CREATE_NO_WINDOW, env, cwd, &startup, &process)) {
free(cmd);
return NULL;
}
free(cmd);
+3 -3
View File
@@ -381,12 +381,12 @@ ext/pfpro not actively maintained
ext/w32api pecl/ffi
ext/yp not actively maintained
sapi/activescript http://pecl4win.php.net/ext.php/php5activescript.dll (PECL package)
or pecl/activescript (CVS)
or pecl/activescript (SVN)
Modules in PECL that are not actively maintained (i.e. have not been supported
for some time, have no active maintainer working on them currently, and do not
have any PECL package releases), are still available in CVS at
http://cvs.php.net/pecl/. However, unreleased PHP modules are by their nature
have any PECL package releases), are still available in SVN at
http://svn.php.net/pecl/. However, unreleased PHP modules are by their nature
unsupported, and your mileage may vary when attempting to install or use them.
9b. Class constants in new PHP 5.1 extensions
+1 -1
View File
@@ -60,7 +60,7 @@ int(%d)
Warning: get_loaded_extensions() expects at most 1 parameter, 2 given in %s on line %d
NULL
Warning: Wrong parameter count for get_defined_constants() in %s on line %d
Warning: get_defined_constants() expects at most 1 parameter, 2 given in %s on line %d
NULL
string(5) "array"
string(5) "array"
+12 -11
View File
@@ -359,7 +359,8 @@ var_dump($global_var);
//Note: No error conditions relating to passing arugments can be tested
// because these are not functions but statements, it will result in syntax error.
echo "Done\n";
?>
===DONE===
--EXPECTF--
*** Testing unset(), empty() & isset() with scalar variables ***
-- Iteration 1 --
@@ -1185,11 +1186,11 @@ bool(true)
*** Testing unset(), emtpy() & isset() with resource variables ***
-- Iteration 1 --
resource(5) of type (stream)
resource(%d) of type (stream)
bool(true)
bool(false)
bool(true)
resource(5) of type (stream)
resource(%d) of type (stream)
bool(false)
bool(true)
bool(false)
@@ -1198,11 +1199,11 @@ bool(false)
Notice: Undefined variable: resource in %s on line %d
NULL
-- Iteration 2 --
resource(6) of type (stream)
resource(%d) of type (stream)
bool(true)
bool(false)
bool(true)
resource(6) of type (stream)
resource(%d) of type (stream)
bool(false)
bool(true)
bool(false)
@@ -1217,7 +1218,7 @@ bool(false)
bool(true)
*** Testing unset(), empty() & isset() with objects ***
object(Point)#1 (3) {
object(Point)#%d (3) {
["x"]=>
int(30)
["y"]=>
@@ -1239,7 +1240,7 @@ bool(false)
Notice: Undefined variable: lable in %s on line %d
bool(true)
object(Point)#1 (3) {
object(Point)#%d (3) {
["x"]=>
int(30)
["y"]=>
@@ -1247,7 +1248,7 @@ object(Point)#1 (3) {
["lable"]=>
string(6) "Point1"
}
object(Point)#1 (2) {
object(Point)#%d (2) {
["y"]=>
int(40)
["lable"]=>
@@ -1255,7 +1256,7 @@ object(Point)#1 (2) {
}
bool(false)
bool(true)
object(Point)#1 (0) {
object(Point)#%d (0) {
}
bool(true)
bool(false)
@@ -1276,7 +1277,7 @@ array(3) {
[2]=>
string(9) "testPoint"
}
object(Point)#1 (3) {
object(Point)#%d (3) {
["x"]=>
int(5)
["y"]=>
@@ -1329,4 +1330,4 @@ bool(false)
bool(false)
bool(true)
int(10)
Done
===DONE===
+3 -1
View File
@@ -41,12 +41,14 @@ $db = new hariCow;
var_dump($db);
?>
===DONE===
--EXPECTF--
Notice: Undefined variable: db in %sbug30162.php on line 35
NULL
object(hariCow)#1 (2) {
object(hariCow)#%d (2) {
["x"]=>
string(1) "x"
["y"]=>
string(1) "y"
}
===DONE===
+82
View File
@@ -0,0 +1,82 @@
--TEST--
Bug #39018 (Error control operator '@' fails to suppress "Uninitialized string offset")
--FILE--
<?php
error_reporting(E_ALL);
$a = 'foo';
$a[11111111111];
$a = '';
$a[0];
print $a[0]; // 12
$a[-11111111111111111111111];
print $a[-11111111111111111111111]; // 16
$a[-0];
$x = 'test';
@$x[4];
@$y = $x[4];
@('a' == $x[4]);
$x[4] == 'a'; // 28
@$x[4] == 'a';
(@$x[4]) == 'a';
($x[4]) == 'a'; // 34
(@($x[4])) == 'a';
(($x[4])) == 'a'; // 38
@($x[4]) == 'a';
($x[4]) == 'a'; // 42
@($x[4] == 'a');
($x[4] == 'a'); // 46
$y = 'foobar';
$y[12.2];
print $y[12.2]; // 52
$y[3.5];
print $y[3.5]; // 56
print "\nDone\n";
?>
--EXPECTF--
Notice: Uninitialized string offset: 0 in %s on line 12
Notice: Uninitialized string offset: -%d in %s on line 16
Notice: Uninitialized string offset: 4 in %s on line 28
Notice: Uninitialized string offset: 4 in %s on line 34
Notice: Uninitialized string offset: 4 in %s on line 38
Notice: Uninitialized string offset: 4 in %s on line 42
Notice: Uninitialized string offset: 4 in %s on line 46
Notice: Uninitialized string offset: 12 in %s on line 52
b
Done
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Bug #39018 [2] (Error control operator '@' fails to suppress "Uninitialized string offset")
--FILE--
<?php
error_reporting(E_ALL);
$foo = 'test';
$x = @$foo[6];
print @($foo[100] + $foo[130]);
print "\nDone\n";
?>
--EXPECT--
0
Done
+3 -1
View File
@@ -6,4 +6,6 @@ Bug #39304 (Segmentation fault with list unpacking of string offset)
list($a, $b) = $s[0];
?>
--EXPECTF--
Fatal error: Cannot use string offset as an array in %sbug39304.php on line 3
Notice: Uninitialized string offset: 0 in %s on line %d
Fatal error: Cannot use string offset as an array in %sbug39304.php on line %d
+38
View File
@@ -0,0 +1,38 @@
--TEST--
bug #42143 (The constant NAN is reported as 0 on Windows build)
--CREDITS--
Venkat Raman Don
--FILE--
<?php
echo "Testing NAN:\n";
echo "NAN= ";
var_dump(NAN);
var_dump(tan(-1) == 123);
var_dump(cos(-100) == "PHP String");
var_dump(deg2rad(-5.6) == null);
var_dump(sqrt(-0.1) == false);
var_dump(sqrt(cos(M_PI)) == 0.1);
var_dump(NAN);
var_dump(is_nan(sqrt(-1.005)) == false);
var_dump(is_nan(floor(1)) == true);
var_dump(log10(-1) == log(-1));
var_dump(log10(-1) != log10(-1));
var_dump(is_finite(log10(-1)) == false);
var_dump(NAN == NAN);
?>
--EXPECT--
Testing NAN:
NAN= float(NAN)
bool(false)
bool(false)
bool(false)
bool(false)
bool(false)
float(NAN)
bool(false)
bool(false)
bool(false)
bool(true)
bool(true)
bool(false)
+1 -1
View File
@@ -1,7 +1,7 @@
--TEST--
Bug #45805 (Crash on throwing exception from error handler)
--SKIPIF--
<?php extension_loaded('reflection') or die('skip'); ?>
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip"; ?>
--FILE--
<?php
class PHPUnit_Util_ErrorHandler
+23
View File
@@ -0,0 +1,23 @@
--TEST--
Bug #45877 (Array key '2147483647' left as string)
--INI--
precision=20
--FILE--
<?php
$keys = array(PHP_INT_MAX,
(string) PHP_INT_MAX,
(string) (-PHP_INT_MAX - 1),
-PHP_INT_MAX - 1,
(string) (PHP_INT_MAX + 1));
var_dump(array_fill_keys($keys, 1));
?>
--EXPECTF--
array(3) {
[%d7]=>
int(1)
[-%d8]=>
int(1)
["%d8"]=>
int(1)
}
+6 -10
View File
@@ -27,16 +27,12 @@ new foo;
?>
--EXPECT--
array(3) {
[-866368000]=>
int(1)
[-835511808]=>
int(2)
[-835350528]=>
int(3)
}
int(2)
array(1) {
[-835350528]=>
[-2147483648]=>
int(3)
}
int(3)
array(1) {
[-2147483648]=>
int(3)
}
+9
View File
@@ -0,0 +1,9 @@
--TEST--
Bug #47704 (crashes on some "bad" operations with string offsets)
--FILE--
<?php
$s = "abd";
$s[0]->a += 1;
?>
--EXPECTF--
Fatal error: Cannot use string offset as an object in %sbug47704.php on line %d
+31
View File
@@ -0,0 +1,31 @@
--TEST--
Bug #47801 (__call() accessed via parent:: operator is provided incorrect method name)
--FILE--
<?php
class A
{
function __call($name, $args)
{
echo("magic method called: $name\n");
}
}
class B extends A
{
function getFoo()
{
parent::getFoo();
}
}
$a = new A();
$a->getFoo();
$b = new B();
$b->getFoo();
?>
--EXPECT--
magic method called: getFoo
magic method called: getFoo
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #47836 (array operator [] inconsistency when the array has PHP_INT_MAX index value)
--FILE--
<?php
$arr[PHP_INT_MAX] = 1;
$arr[] = 2;
var_dump($arr);
?>
--EXPECTF--
Warning: Cannot add element to the array as the next element is already occupied in %s on line 4
array(1) {
[%d]=>
int(1)
}
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #47981 (error handler not called regardless)
--INI--
error_reporting=0
--FILE--
<?php
function errh($errno, $errstr) {
var_dump($errstr);
}
set_error_handler("errh");
interface a{}
class b implements a { function f($a=1) {}}
class c extends b {function f() {}}
?>
--EXPECTF--
string(62) "Declaration of c::f() should be compatible with that of b::f()"
+32
View File
@@ -0,0 +1,32 @@
--TEST--
Bug #48228 (crash when exception is thrown while passing function arguments)
--FILE--
<?php
function do_throw() {
throw new Exception();
}
class aa
{
function check()
{
}
function dosome()
{
$this->check(do_throw());
}
}
$l_aa=new aa();
$l_aa->dosome();
?>
--EXPECTF--
Fatal error: Uncaught exception 'Exception' in %s
Stack trace:
#0 %s(%d): do_throw()
#1 %s(%d): aa->dosome()
#2 {main}
thrown in %s
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #48248 (SIGSEGV when access to private property via &__get)
--FILE--
<?php
class A
{
public function & __get($name)
{
return $this->test;
}
}
class B extends A
{
private $test;
}
$b = new B;
var_dump($b->test);
?>
--EXPECTF--
Notice: Undefined property: B::$test in %s on line %d
Notice: Only variable references should be returned by reference in %s on line %d
NULL
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Bug #48408 (crash when exception is thrown while passing function arguments)
--FILE--
<?php
class B{
public function process($x){
return $x;
}
}
class C{
public function generate($x){
throw new Exception;
}
}
$b = new B;
$c = new C;
try{
$b->process($c->generate(0));
}
catch(Exception $e){
$c->generate(0);
}
?>
--EXPECTF--
Fatal error: Uncaught exception 'Exception' in %s
Stack trace:
#0 %s(%d): C->generate(0)
#1 {main}
thrown in %s
+67
View File
@@ -0,0 +1,67 @@
--TEST--
Bug #48409 (crash when exception is thrown while passing function arguments)
--FILE--
<?php
class ABCException extends Exception {}
class BBB
{
public function xyz($d, $x)
{
if ($x == 34) {
throw new ABCException;
}
return array('foo' => 'xyz');
}
}
class CCC
{
public function process($p)
{
return $p;
}
}
class AAA
{
public function func()
{
$b = new BBB;
$c = new CCC;
$i = 34;
$item = array('foo' => 'bar');
try {
$c->process($b->xyz($item['foo'], $i));
}
catch(ABCException $e) {
$b->xyz($item['foo'], $i);
}
} // end func();
}
class Runner
{
public function run($x)
{
try {
$x->func();
}
catch(ABCException $e) {
throw new Exception;
}
}
}
try {
$runner = new Runner;
$runner->run(new AAA);
}
catch(Exception $e) {
die('Exception thrown');
}
?>
--EXPECT--
Exception thrown
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #48428 (crash when exception is thrown while passing function arguments)
--FILE--
<?php
try {
function x() { throw new Exception("ERROR"); }
x(x());
} catch(Exception $e) {
echo($e -> getMessage());
}
?>
--EXPECT--
ERROR
+28
View File
@@ -0,0 +1,28 @@
--TEST--
Bug #48693 (Double declaration of __lambda_func when lambda wrongly formatted)
--FILE--
<?php
$x = create_function('', 'return 1; }');
$y = create_function('', 'function a() { }; return 2;');
$z = create_function('', '{');
$w = create_function('', 'return 3;');
var_dump(
$x,
$y(),
$z,
$w(),
$y != $z
);
?>
--EXPECTF--
Parse error: syntax error, unexpected '}' in %s(%d) : runtime-created function on line 1
Parse error: syntax error, unexpected $end in %s(%d) : runtime-created function on line 1
bool(false)
int(2)
bool(false)
int(3)
bool(true)
+51
View File
@@ -0,0 +1,51 @@
--TEST--
Bug #48770 (call_user_func_array() fails to call parent from inheriting class)
--FILE--
<?php
class A {
public function func($str) {
var_dump(__METHOD__ .': '. $str);
}
private function func2($str) {
var_dump(__METHOD__ .': '. $str);
}
protected function func3($str) {
var_dump(__METHOD__ .': '. $str);
}
private function func22($str) {
var_dump(__METHOD__ .': '. $str);
}
}
class B extends A {
public function func($str) {
static $avoid_crash = 0;
if ($avoid_crash++ == 1) {
print "This method shouldn't be called when using parent::func!\n";
return;
}
call_user_func_array(array($this, 'parent::func'), array($str));
}
private function func2($str) {
var_dump(__METHOD__ .': '. $str);
}
protected function func3($str) {
var_dump(__METHOD__ .': '. $str);
}
}
class C extends B {
public function func($str) {
parent::func($str);
}
}
$c = new C;
$c->func('This should work!');
?>
--EXPECTF--
%unicode|string%(26) "A::func: This should work!"
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Bug #49269 (Ternary operator fails on Iterator object when used inside foreach declaration).
--FILE--
<?php
class TestObject implements Iterator
{
public $n = 0;
function valid()
{
return ($this->n < 3);
}
function current() {return $this->n;}
function next() {$this->n++;}
function key() { }
function rewind() {$this->n = 0;}
}
$array_object = new TestObject();
foreach ((true ? $array_object : $array_object) as $item) echo "$item\n";
?>
--EXPECT--
0
1
2
+27
View File
@@ -0,0 +1,27 @@
--TEST--
Bug #49472 (Constants defined in Interfaces can be overridden)
--FILE--
<?php
interface ia {
const c = 'Sea';
const y = 2;
}
class Foo implements ia {
}
class FooBar extends Foo implements ia {
const x = 1;
const c = 'Ocean';
public function show() {
return ia::c;
}
}
new FooBar;
?>
--EXPECTF--
Fatal error: Cannot inherit previously-inherited or override constant c from interface ia in %s on line %d
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #50005 (Throwing through Reflection modified Exception object makes segmentation fault)
--FILE--
<?php
class a extends exception {
public function __construct() {
$this->file = null;
}
}
throw new a;
?>
--EXPECTF--
Fatal error: Uncaught exception 'a' in :%d
Stack trace:
#0 {main}
thrown in Unknown on line %d
+33
View File
@@ -0,0 +1,33 @@
--TEST--
Bug #50174 (Incorrectly matched docComment)
--SKIPIF--
<?php if (!extension_loaded('reflection') || !extension_loaded('spl')) print "skip"; ?>
--FILE--
<?php
class TestClass
{
/** const comment */
const C = 0;
function x() {}
}
$rm = new ReflectionMethod('TestClass', 'x');
var_dump($rm->getDocComment());
class TestClass2
{
/** const comment */
const C = 0;
public $x;
}
$rp = new ReflectionProperty('TestClass2', 'x');
var_dump($rp->getDocComment());
?>
--EXPECT--
bool(false)
bool(false)
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Bug #50255 (isset() and empty() silently casts array to object)
--FILE--
<?php
$arr = array('foo' => 'bar');
print "isset\n";
var_dump(isset($arr->foo));
var_dump(isset($arr->bar));
var_dump(isset($arr['foo']));
var_dump(isset($arr['bar']));
print "empty\n";
var_dump(empty($arr->foo));
var_dump(empty($arr->bar));
var_dump(empty($arr['foo']));
var_dump(empty($arr['bar']));
?>
--EXPECT--
isset
bool(false)
bool(false)
bool(true)
bool(false)
empty
bool(true)
bool(true)
bool(false)
bool(true)
+2 -2
View File
@@ -16,5 +16,5 @@ class test implements test1, test2 {
echo "Done\n";
?>
--EXPECTF--
Fatal error: Cannot inherit previously-inherited constant FOO from interface test2 in %s on line %d
--EXPECTF--
Fatal error: Cannot inherit previously-inherited or override constant FOO from interface test2 in %s on line %d
+30
View File
@@ -0,0 +1,30 @@
--TEST--
Testing Exception's methods
--FILE--
<?php
$x = new Exception;
$x->gettraceasstring(1);
$x->gettraceasstring();
$x->__tostring(1);
$x->gettrace(1);
$x->getline(1);
$x->getfile(1);
$x->getmessage(1);
$x->getcode(1);
?>
--EXPECTF--
Warning: Wrong parameter count for Exception::getTraceAsString() in %s on line %d
Warning: Wrong parameter count for Exception::__toString() in %s on line %d
Warning: Wrong parameter count for Exception::getTrace() in %s on line %d
Warning: Wrong parameter count for Exception::getLine() in %s on line %d
Warning: Wrong parameter count for Exception::getFile() in %s on line %d
Warning: Wrong parameter count for Exception::getMessage() in %s on line %d
Warning: Wrong parameter count for Exception::getCode() in %s on line %d
+39
View File
@@ -0,0 +1,39 @@
--TEST--
function_exists function : basic functionality
--FILE--
<?php
/*
* proto bool function_exists(string function_name)
* Function is implemented in Zend/zend_builtin_functions.c
*/
echo "*** Testing function_exists() : basic functionality ***\n";
echo "Internal function: ";
var_dump(function_exists('function_exists'));
echo "User defined function: ";
function f() {}
var_dump(function_exists('f'));
echo "Case sensitivity: ";
var_dump(function_exists('F'));
echo "Non existent function: ";
var_dump(function_exists('g'));
echo "Method: ";
Class C {
static function f() {}
}
var_dump(function_exists('C::f'));
?>
===Done===
--EXPECT--
*** Testing function_exists() : basic functionality ***
Internal function: bool(true)
User defined function: bool(true)
Case sensitivity: bool(true)
Non existent function: bool(false)
Method: bool(false)
===Done===
+36
View File
@@ -0,0 +1,36 @@
--TEST--
Test function_exists() function : error conditions
--FILE--
<?php
/*
* proto bool function_exists(string function_name)
* Function is implemented in Zend/zend_builtin_functions.c
*/
echo "*** Testing function_exists() : error conditions ***\n";
$arg_0 = "ABC";
$extra_arg = 1;
echo "\nToo many arguments\n";
var_dump(function_exists($arg_0, $extra_arg));
echo "\nToo few arguments\n";
var_dump(function_exists());
?>
===Done===
--EXPECTF--
*** Testing function_exists() : error conditions ***
Too many arguments
Warning: Wrong parameter count for function_exists() in %s on line %d
NULL
Too few arguments
Warning: Wrong parameter count for function_exists() in %s on line %d
NULL
===Done===
+135
View File
@@ -0,0 +1,135 @@
--TEST--
Test function_exists() function : usage variations - test values for $str argument
--FILE--
<?php
/*
* proto bool function_exists(string function_name)
* Function is implemented in Zend/zend_builtin_functions.c
*/
echo "*** Testing function_exists() function: with unexpected inputs for 'str' argument ***\n";
//get an unset variable
$unset_var = 'string_val';
unset($unset_var);
//defining a class
class sample {
public function __toString() {
return "sample object";
}
}
//getting the resource
$file_handle = fopen(__FILE__, "r");
// array with different values for $str
$inputs = array (
// integer values
0,
1,
255,
256,
PHP_INT_MAX,
-PHP_INT_MAX,
// float values
10.5,
-20.5,
10.1234567e10,
// array values
array(),
array(0),
array(1, 2),
// boolean values
true,
false,
TRUE,
FALSE,
// null values
NULL,
null,
// objects
new sample(),
// resource
$file_handle,
// undefined variable
@$undefined_var,
// unset variable
@$unset_var
);
// loop through with each element of the $inputs array to test function_exists() function
$count = 1;
foreach($inputs as $input) {
echo "-- Iteration $count --\n";
var_dump( function_exists($input) );
$count ++;
}
fclose($file_handle); //closing the file handle
?>
===Done===
--EXPECTF--
*** Testing function_exists() function: with unexpected inputs for 'str' argument ***
-- Iteration 1 --
bool(false)
-- Iteration 2 --
bool(false)
-- Iteration 3 --
bool(false)
-- Iteration 4 --
bool(false)
-- Iteration 5 --
bool(false)
-- Iteration 6 --
bool(false)
-- Iteration 7 --
bool(false)
-- Iteration 8 --
bool(false)
-- Iteration 9 --
bool(false)
-- Iteration 10 --
Notice: Array to string conversion in %s on line %d
bool(false)
-- Iteration 11 --
Notice: Array to string conversion in %s on line %d
bool(false)
-- Iteration 12 --
Notice: Array to string conversion in %s on line %d
bool(false)
-- Iteration 13 --
bool(false)
-- Iteration 14 --
bool(false)
-- Iteration 15 --
bool(false)
-- Iteration 16 --
bool(false)
-- Iteration 17 --
bool(false)
-- Iteration 18 --
bool(false)
-- Iteration 19 --
bool(false)
-- Iteration 20 --
bool(false)
-- Iteration 21 --
bool(false)
-- Iteration 22 --
bool(false)
===Done===
+3 -1
View File
@@ -33,7 +33,7 @@ new C;
?>
--EXPECT--
array(5) {
array(6) {
["aaa"]=>
int(7)
["ccc"]=>
@@ -42,6 +42,8 @@ array(5) {
int(1)
["aa"]=>
int(4)
["bb"]=>
int(5)
["cc"]=>
int(6)
}
+3 -1
View File
@@ -44,5 +44,7 @@ array(1) {
["a"]=>
int(1)
}
array(0) {
array(1) {
["a"]=>
int(1)
}
@@ -0,0 +1,59 @@
--TEST--
get_defined_functions() function : basic functionality
--FILE--
<?php
/* Prototype : array get_defined_functions ( void )
* Description: Gets an array of all defined functions.
* Source code: Zend/zend_builtin_functions.c
*/
echo "*** Testing get_defined_functions() : basic functionality ***\n";
function foo() {}
// mixed case function
function HelloWorld() {}
Class C {
function f1() {}
static function f2() {}
}
$func = get_defined_functions();
if (!is_array($func)) {
echo "TEST FAILED: return type not an array\n";
}
if (!is_array($func["internal"])) {
echo "TEST FAILED: no element in result array with key 'internal'\n";
}
$internal = $func["internal"];
//check for a few core functions
if (!in_array("cos", $internal) || !in_array("strlen", $internal)) {
echo "TEST FAILED: missing elements from 'internal' array\n";
var_dump($internal);
}
if (!is_array($func["user"])) {
echo "TEST FAILED: no element in result array with key 'user'\n";
}
$user = $func["user"];
if (count($user) == 2 && in_array("foo", $user) && in_array("helloworld", $user)) {
echo "TEST PASSED\n";
} else {
echo "TEST FAILED: missing elements from 'user' array\n";
var_dump($user);
}
?>
===Done===
--EXPECT--
*** Testing get_defined_functions() : basic functionality ***
TEST PASSED
===Done===
@@ -0,0 +1,29 @@
--TEST--
Test get_defined_functions() function : error conditions
--FILE--
<?php
/* Prototype : array get_defined_functions ( void )
* Description: Gets an array of all defined functions.
* Source code: Zend/zend_builtin_functions.c
*/
echo "*** Testing get_defined_functions() : error conditions ***\n";
echo "\n-- Testing get_defined_functions() function with more than expected no. of arguments --\n";
$extra_arg = 10;
var_dump( get_defined_functions($extra_arg) );
?>
===Done===
--EXPECTF--
*** Testing get_defined_functions() : error conditions ***
-- Testing get_defined_functions() function with more than expected no. of arguments --
Warning: Wrong parameter count for get_defined_functions() in %s on line %d
NULL
===Done===
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Check if get_required_files works
--CREDITS--
Sebastian Schürmann
sschuermann@chip.de
Testfest 2009 Munich
--FILE--
<?php
$files = get_required_files();
var_dump($files);
?>
--EXPECTF--
array(1) {
[0]=>
%string|unicode%(%d)%s
}
+18
View File
@@ -0,0 +1,18 @@
--TEST--
Crash when function parameter modified via unexpected reference
--FILE--
<?php
function my_errorhandler($errno,$errormsg) {
global $my_var;
$my_var = 0;
return true;
}
set_error_handler("my_errorhandler");
$my_var = str_repeat("A",64);
$data = call_user_func_array("explode",array(new StdClass(), &$my_var));
$my_var=array(1,2,3);
$data = call_user_func_array("implode",array(&$my_var, new StdClass()));
echo "Done.\n";
?>
--EXPECTF--
Done.
-2
View File
@@ -1,7 +1,5 @@
--TEST--
unset() CV 7 (indirect unset() of global variable in import_request_variables())
--SKIPIF--
<?php if (php_sapi_name()=='cli') echo 'skip'; ?>
--GET--
x=2
--FILE--
+2 -2
View File
@@ -835,7 +835,7 @@ void zend_deactivate_modules(TSRMLS_D)
EG(opline_ptr) = NULL; /* we're no longer executing anything */
zend_try {
zend_hash_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
zend_hash_reverse_apply(&module_registry, (apply_func_t) module_registry_cleanup TSRMLS_CC);
} zend_end_try();
}
@@ -1078,7 +1078,7 @@ ZEND_API void zend_error(int type, const char *format, ...)
}
}
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((alias("zend_error"),noreturn));
#endif
+19 -1
View File
@@ -178,6 +178,12 @@ char *alloca ();
#endif
#if defined(__GNUC__) && ZEND_GCC_VERSION >= 3400
#else
# define __restrict__
#endif
#define restrict __restrict__
#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) && !defined(DARWIN)
# define do_alloca(p) alloca(p)
# define free_alloca(p)
@@ -249,6 +255,18 @@ char *alloca ();
#define LONG_MIN (- LONG_MAX - 1)
#endif
#if SIZEOF_LONG == 4
#define MAX_LENGTH_OF_LONG 11
static const char long_min_digits[] = "2147483648";
#elif SIZEOF_LONG == 8
#define MAX_LENGTH_OF_LONG 20
static const char long_min_digits[] = "9223372036854775808";
#else
#error "Unknown SIZEOF_LONG"
#endif
#define MAX_LENGTH_OF_DOUBLE 32
#undef SUCCESS
#undef FAILURE
#define SUCCESS 0
@@ -262,7 +280,7 @@ char *alloca ();
#define INTERNAL_FUNCTION_PARAMETERS int ht, zval *return_value, zval **return_value_ptr, zval *this_ptr, int return_value_used TSRMLS_DC
#define INTERNAL_FUNCTION_PARAM_PASSTHRU ht, return_value, return_value_ptr, this_ptr, return_value_used TSRMLS_CC
#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__)
#if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__INTEL_COMPILER) && !defined(DARWIN) && !defined(__hpux) && !defined(_AIX) && !defined(__osf__) && __GNUC__ >= 3
# define ZEND_VM_ALWAYS_INLINE __attribute__ ((always_inline))
void zend_error_noreturn(int type, const char *format, ...) __attribute__ ((noreturn));
#else
+10 -11
View File
@@ -901,21 +901,21 @@ ZEND_API void zend_update_class_constants(zend_class_entry *class_type TSRMLS_DC
zend_hash_get_current_key_ex(&class_type->default_static_members, &str_index, &str_length, &num_index, 0, &pos);
if ((*p)->is_ref &&
class_type->parent &&
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
*p == *q &&
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
class_type->parent &&
zend_hash_find(&class_type->parent->default_static_members, str_index, str_length, (void**)&q) == SUCCESS &&
*p == *q &&
zend_hash_find(CE_STATIC_MEMBERS(class_type->parent), str_index, str_length, (void**)&q) == SUCCESS) {
(*q)->refcount++;
(*q)->is_ref = 1;
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)q, sizeof(zval*), NULL);
} else {
zval *q;
zval *r;
ALLOC_ZVAL(q);
*q = **p;
INIT_PZVAL(q);
zval_copy_ctor(q);
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&q, sizeof(zval*), NULL);
ALLOC_ZVAL(r);
*r = **p;
INIT_PZVAL(r);
zval_copy_ctor(r);
zend_hash_add(CE_STATIC_MEMBERS(class_type), str_index, str_length, (void**)&r, sizeof(zval*), NULL);
}
zend_hash_move_forward_ex(&class_type->default_static_members, &pos);
}
@@ -1782,7 +1782,6 @@ ZEND_API int zend_register_functions(zend_class_entry *scope, zend_function_entr
fname_len = strlen(ptr->fname);
lowercase_name = zend_str_tolower_dup(ptr->fname, fname_len);
if (zend_hash_exists(target_function_table, lowercase_name, fname_len+1)) {
efree(lowercase_name);
zend_error(error_type, "Function registration failed - duplicate name - %s%s%s", scope ? scope->name : "", scope ? "::" : "", ptr->fname);
}
efree(lowercase_name);
+10 -1
View File
@@ -148,7 +148,12 @@ static zend_mm_segment* zend_mm_mem_mmap_realloc(zend_mm_storage *storage, zend_
{
zend_mm_segment *ret;
#ifdef HAVE_MREMAP
#if defined(__NetBSD__)
/* NetBSD 5 supports mremap but takes an extra newp argument */
ret = (zend_mm_segment*)mremap(segment, segment->size, segment, size, MREMAP_MAYMOVE);
#else
ret = (zend_mm_segment*)mremap(segment, segment->size, size, MREMAP_MAYMOVE);
#endif
if (ret == MAP_FAILED) {
#endif
ret = storage->handlers->_alloc(storage, size);
@@ -2472,7 +2477,11 @@ ZEND_API size_t zend_memory_usage(int real_usage TSRMLS_DC)
if (real_usage) {
return AG(mm_heap)->real_size;
} else {
return AG(mm_heap)->size;
size_t usage = AG(mm_heap)->size;
#if ZEND_MM_CACHE
usage -= AG(mm_heap)->cached;
#endif
return usage;
}
}
+1 -1
View File
@@ -89,7 +89,7 @@ inline static void * __zend_malloc(size_t len)
inline static void * __zend_calloc(size_t nmemb, size_t len)
{
void *tmp = _safe_malloc(nmemb, len, 0);
memset(tmp, 0, len);
memset(tmp, 0, nmemb * len);
return tmp;
}
+46 -20
View File
@@ -33,7 +33,7 @@ static ZEND_FUNCTION(zend_version);
static ZEND_FUNCTION(func_num_args);
static ZEND_FUNCTION(func_get_arg);
static ZEND_FUNCTION(func_get_args);
static ZEND_NAMED_FUNCTION(zend_if_strlen);
static ZEND_FUNCTION(strlen);
static ZEND_FUNCTION(strcmp);
static ZEND_FUNCTION(strncmp);
static ZEND_FUNCTION(strcasecmp);
@@ -93,7 +93,7 @@ static zend_function_entry builtin_functions[] = {
ZEND_FE(func_num_args, NULL)
ZEND_FE(func_get_arg, NULL)
ZEND_FE(func_get_args, NULL)
{ "strlen", zend_if_strlen, NULL },
ZEND_FE(strlen, NULL)
ZEND_FE(strcmp, NULL)
ZEND_FE(strncmp, NULL)
ZEND_FE(strcasecmp, NULL)
@@ -275,7 +275,7 @@ ZEND_FUNCTION(func_get_args)
/* {{{ proto int strlen(string str)
Get string length */
ZEND_NAMED_FUNCTION(zend_if_strlen)
ZEND_FUNCTION(strlen)
{
zval **str;
@@ -461,6 +461,7 @@ ZEND_FUNCTION(define)
zend_bool non_cs = 0;
int case_sensitive = CONST_CS;
zend_constant c;
char *p;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz|b", &name, &name_len, &val, &non_cs) == FAILURE) {
return;
@@ -470,6 +471,34 @@ ZEND_FUNCTION(define)
case_sensitive = 0;
}
/* class constant, check if there is name and make sure class is valid & exists */
if ((p = zend_memnstr(name, "::", sizeof("::") - 1, name + name_len))) {
char *class_name;
int found;
zend_class_entry **ce;
ALLOCA_FLAG(use_heap)
if (p == (name + name_len - sizeof("::") + 1)) {
zend_error(E_WARNING, "Class constant must have a name");
RETURN_FALSE;
} else if (p == name) {
zend_error(E_WARNING, "Missing class name");
RETURN_FALSE;
}
class_name = do_alloca_with_limit((p - name + 1), use_heap);
zend_str_tolower_copy(class_name, name, (p - name));
found = zend_hash_find(EG(class_table), class_name, p - name + 1, (void **) &ce);
if (found != SUCCESS) {
zend_error(E_WARNING, "Class '%s' does not exist", class_name);
free_alloca_with_limit(class_name, use_heap);
RETURN_FALSE;
}
free_alloca_with_limit(class_name, use_heap);
}
repeat:
switch (Z_TYPE_P(val)) {
case IS_LONG:
@@ -706,27 +735,22 @@ static void add_class_vars(zend_class_entry *ce, HashTable *properties, zval *re
while (zend_hash_get_current_data_ex(properties, (void **) &prop, &pos) == SUCCESS) {
char *key, *class_name, *prop_name;
uint key_len;
ulong num_index, h;
ulong num_index;
int prop_name_len = 0;
zval *prop_copy;
zend_property_info *property_info;
zval zprop_name;
zend_hash_get_current_key_ex(properties, &key, &key_len, &num_index, 0, &pos);
zend_hash_move_forward_ex(properties, &pos);
zend_unmangle_property_name(key, key_len-1, &class_name, &prop_name);
prop_name_len = strlen(prop_name);
h = zend_get_hash_value(prop_name, prop_name_len+1);
if (zend_hash_quick_find(&ce->properties_info, prop_name, prop_name_len+1, h, (void **) &property_info) == FAILURE) {
continue;
}
if (property_info->flags & ZEND_ACC_SHADOW) {
continue;
} else if ((property_info->flags & ZEND_ACC_PRIVATE) && EG(scope) != ce) {
continue;
} else if ((property_info->flags & ZEND_ACC_PROTECTED) && zend_check_protected(ce, EG(scope)) == 0) {
ZVAL_STRINGL(&zprop_name, prop_name, prop_name_len, 0);
property_info = zend_get_property_info(ce, &zprop_name, 1 TSRMLS_CC);
if (!property_info || property_info == &EG(std_property_info)) {
continue;
}
@@ -1492,6 +1516,7 @@ ZEND_FUNCTION(create_function)
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_STRINGL(function_name, function_name_length, 0);
} else {
zend_hash_del(EG(function_table), LAMBDA_TEMP_FUNCNAME, sizeof(LAMBDA_TEMP_FUNCNAME));
RETURN_FALSE;
}
}
@@ -1594,15 +1619,15 @@ ZEND_FUNCTION(get_loaded_extensions)
Return an array containing the names and values of all defined constants */
ZEND_FUNCTION(get_defined_constants)
{
int argc = ZEND_NUM_ARGS();
zend_bool categorize = 0;
if (argc != 0 && argc != 1) {
ZEND_WRONG_PARAM_COUNT();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &categorize) == FAILURE) {
return;
}
array_init(return_value);
if (argc) {
if (categorize) {
HashPosition pos;
zend_constant *val;
int module_number;
@@ -1617,7 +1642,8 @@ ZEND_FUNCTION(get_defined_constants)
module_names[0] = "internal";
zend_hash_internal_pointer_reset_ex(&module_registry, &pos);
while (zend_hash_get_current_data_ex(&module_registry, (void *) &module, &pos) != FAILURE) {
module_names[i++] = module->name;
module_names[module->module_number] = module->name;
i++;
zend_hash_move_forward_ex(&module_registry, &pos);
}
module_names[i] = "user";
+23 -11
View File
@@ -1536,11 +1536,8 @@ void zend_do_begin_class_member_function_call(znode *class_name, znode *method_n
memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) == 0) {
zval_dtor(&opline->op2.u.constant);
SET_UNUSED(opline->op2);
efree(lcname);
} else {
efree(opline->op2.u.constant.value.str.val);
opline->op2.u.constant.value.str.val = lcname;
}
efree(lcname);
}
zend_stack_push(&CG(function_call_stack), (void *) &ptr, sizeof(zend_function *));
@@ -2138,7 +2135,7 @@ static zend_bool do_inherit_method_check(HashTable *child_function_table, zend_f
if (!zend_do_perform_implementation_check(child, child->common.prototype)) {
zend_error(E_COMPILE_ERROR, "Declaration of %s::%s() must be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(child->common.prototype), child->common.prototype->common.function_name);
}
} else if (EG(error_reporting) & E_STRICT) { /* Check E_STRICT before the check so that we save some time */
} else if (EG(error_reporting) & E_STRICT || EG(user_error_handler)) { /* Check E_STRICT (or custom error handler) before the check so that we save some time */
if (!zend_do_perform_implementation_check(child, parent)) {
zend_error(E_STRICT, "Declaration of %s::%s() should be compatible with that of %s::%s()", ZEND_FN_SCOPE_NAME(child), child->common.function_name, ZEND_FN_SCOPE_NAME(parent), parent->common.function_name);
}
@@ -2336,20 +2333,28 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
}
}
static zend_bool do_inherit_constant_check(HashTable *child_constants_table, zval **parent_constant, zend_hash_key *hash_key, zend_class_entry *iface)
{
zval **old_constant;
if (zend_hash_quick_find(child_constants_table, hash_key->arKey, hash_key->nKeyLength, hash_key->h, (void**)&old_constant) == SUCCESS) {
if (*old_constant != *parent_constant) {
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited constant %s from interface %s", hash_key->arKey, iface->name);
if (*old_constant != *parent_constant) {
zend_error(E_COMPILE_ERROR, "Cannot inherit previously-inherited or override constant %s from interface %s", hash_key->arKey, iface->name);
}
return 0;
}
return 1;
}
static int do_interface_constant_check(zval **val, int num_args, va_list args, zend_hash_key *key) /* {{{ */
{
zend_class_entry **iface = va_arg(args, zend_class_entry**);
do_inherit_constant_check(&(*iface)->constants_table, val, key, *iface);
return ZEND_HASH_APPLY_KEEP;
}
/* }}} */
ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry *iface TSRMLS_DC)
{
@@ -2369,7 +2374,10 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
}
}
}
if (!ignore) {
if (ignore) {
/* Check for attempt to redeclare interface constants */
zend_hash_apply_with_arguments(&ce->constants_table, (apply_func_args_t) do_interface_constant_check, 1, &iface);
} else {
if (ce->num_interfaces >= current_iface_num) {
if (ce->type == ZEND_INTERNAL_CLASS) {
ce->interfaces = (zend_class_entry **) realloc(ce->interfaces, sizeof(zend_class_entry *) * (++current_iface_num));
@@ -3106,6 +3114,12 @@ void zend_do_declare_class_constant(znode *var_name, znode *value TSRMLS_DC)
zend_error(E_COMPILE_ERROR, "Cannot redefine class constant %s::%s", CG(active_class_entry)->name, var_name->u.constant.value.str.val);
}
FREE_PNODE(var_name);
if (CG(doc_comment)) {
efree(CG(doc_comment));
CG(doc_comment) = NULL;
CG(doc_comment_len) = 0;
}
}
@@ -4195,8 +4209,6 @@ again:
case T_END_HEREDOC:
efree(Z_STRVAL(zendlval->u.constant));
break;
case EOF:
return EOF;
}
INIT_PZVAL(&zendlval->u.constant);
+8 -1
View File
@@ -428,9 +428,14 @@ static int _build_trace_string(zval **frame, int num_args, va_list args, zend_ha
ZEND_METHOD(exception, getTraceAsString)
{
zval *trace;
char *res = estrdup(""), **str = &res, *s_tmp;
char *res, **str, *s_tmp;
int res_len = 0, *len = &res_len, num = 0;
DEFAULT_0_PARAMS;
res = estrdup("");
str = &res;
trace = zend_read_property(default_exception_ce, getThis(), "trace", sizeof("trace")-1, 1 TSRMLS_CC);
zend_hash_apply_with_arguments(Z_ARRVAL_P(trace), (apply_func_args_t)_build_trace_string, 3, str, len, &num);
@@ -465,6 +470,8 @@ ZEND_METHOD(exception, __toString)
int len;
zend_fcall_info fci;
zval fname;
DEFAULT_0_PARAMS;
_default_exception_get_entry(getThis(), "message", sizeof("message")-1, &message TSRMLS_CC);
_default_exception_get_entry(getThis(), "file", sizeof("file")-1, &file TSRMLS_CC);
+4 -1
View File
@@ -183,7 +183,6 @@ static inline zval *_get_zval_ptr_var(znode *node, temp_variable *Ts, zend_free_
if (T->str_offset.str->type != IS_STRING
|| ((int)T->str_offset.offset < 0)
|| (T->str_offset.str->value.str.len <= (int)T->str_offset.offset)) {
zend_error(E_NOTICE, "Uninitialized string offset: %d", T->str_offset.offset);
ptr->value.str.val = STR_EMPTY_ALLOC();
ptr->value.str.len = 0;
} else {
@@ -1133,6 +1132,10 @@ static void zend_fetch_dimension_address(temp_variable *result, zval **container
break;
}
if (result) {
if ((Z_LVAL_P(dim) < 0 || Z_STRLEN_P(container) <= Z_LVAL_P(dim)) &&
(type == BP_VAR_R || type == BP_VAR_IS)) {
zend_error(E_NOTICE, "Uninitialized string offset: %ld", Z_LVAL_P(dim));
}
container = *container_ptr;
result->str_offset.str = container;
PZVAL_LOCK(container);
+21
View File
@@ -169,6 +169,27 @@ static inline int zend_ptr_stack_get_arg(int requested_arg, void **data TSRMLS_D
return SUCCESS;
}
static inline void zend_arg_types_stack_2_pop(zend_ptr_stack *stack, zval **object, zend_function **fbc)
{
void *a, *b;
zend_ptr_stack_2_pop(stack, &a, &b);
*object = (zval *) a;
*fbc = (zend_function *) b;
}
static inline void zend_arg_types_stack_3_pop(zend_ptr_stack *stack, zend_class_entry **called_scope, zval **object, zend_function **fbc)
{
void *a, *b, *c;
zend_ptr_stack_3_pop(stack, &a, &b, &c);
*called_scope = (zend_class_entry *) a;
*object = (zval *) b;
*fbc = (zend_function *) c;
}
void execute_new_code(TSRMLS_D);
+15 -5
View File
@@ -835,11 +835,8 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
efree(function_name_lc);
}
} else if (calling_scope) {
char *function_name_lc = zend_str_tolower_dup(fname, fname_len);
EX(function_state).function = zend_std_get_static_method(calling_scope, fname, fname_len TSRMLS_CC);
EX(function_state).function =
zend_std_get_static_method(calling_scope, function_name_lc, fname_len TSRMLS_CC);
efree(function_name_lc);
if (check_scope_or_static && EX(function_state).function
&& !(EX(function_state).function->common.fn_flags & ZEND_ACC_STATIC)
&& !instanceof_function(check_scope_or_static, calling_scope TSRMLS_CC)) {
@@ -924,6 +921,12 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
for (i=0; i<fci->param_count; i++) {
zval *param;
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION
&& !ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i + 1)
&& PZVAL_IS_REF(*fci->params[i])) {
SEPARATE_ZVAL(fci->params[i]);
}
if (ARG_SHOULD_BE_SENT_BY_REF(EX(function_state).function, i+1)
&& !PZVAL_IS_REF(*fci->params[i])) {
if ((*fci->params[i])->refcount>1) {
@@ -1209,13 +1212,16 @@ ZEND_API int zend_eval_string(char *str, zval *retval_ptr, char *string_name TSR
zval *local_retval_ptr=NULL;
zval **original_return_value_ptr_ptr = EG(return_value_ptr_ptr);
zend_op **original_opline_ptr = EG(opline_ptr);
int orig_interactive = CG(interactive);
EG(return_value_ptr_ptr) = &local_retval_ptr;
EG(active_op_array) = new_op_array;
EG(no_extensions)=1;
CG(interactive) = 0;
zend_execute(new_op_array TSRMLS_CC);
CG(interactive) = orig_interactive;
if (local_retval_ptr) {
if (retval_ptr) {
COPY_PZVAL_TO_ZVAL(*retval_ptr, local_retval_ptr);
@@ -1262,6 +1268,7 @@ void execute_new_code(TSRMLS_D)
zend_op *opline, *end;
zend_op *ret_opline;
zval *local_retval=NULL;
int orig_interactive;
if (!(CG(active_op_array)->fn_flags & ZEND_ACC_INTERACTIVE)
|| CG(active_op_array)->backpatch_count>0
@@ -1311,7 +1318,10 @@ void execute_new_code(TSRMLS_D)
EG(return_value_ptr_ptr) = &local_retval;
EG(active_op_array) = CG(active_op_array);
orig_interactive = CG(interactive);
CG(interactive) = 0;
zend_execute(CG(active_op_array) TSRMLS_CC);
CG(interactive) = orig_interactive;
if (local_retval) {
zval_ptr_dtor(&local_retval);
}
@@ -1501,7 +1511,7 @@ void zend_unset_timeout(TSRMLS_D)
}
#else
# ifdef HAVE_SETITIMER
{
if (EG(timeout_seconds)) {
struct itimerval no_timeout;
no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;
+2 -2
View File
@@ -376,7 +376,7 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
UPDATE_DATA(ht, p, pData, nDataSize);
HANDLE_UNBLOCK_INTERRUPTIONS();
if ((long)h >= (long)ht->nNextFreeElement) {
ht->nNextFreeElement = h + 1;
ht->nNextFreeElement = h < LONG_MAX ? h + 1 : LONG_MAX;
}
if (pDest) {
*pDest = p->pData;
@@ -404,7 +404,7 @@ ZEND_API int _zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
HANDLE_UNBLOCK_INTERRUPTIONS();
if ((long)h >= (long)ht->nNextFreeElement) {
ht->nNextFreeElement = h + 1;
ht->nNextFreeElement = h < LONG_MAX ? h + 1 : LONG_MAX;
}
ht->nNumOfElements++;
ZEND_HASH_IF_FULL_DO_RESIZE(ht);
+36 -35
View File
@@ -298,40 +298,41 @@ END_EXTERN_C()
zend_hash_init(ht, n, NULL, ZVAL_PTR_DTOR, persistent)
#define HANDLE_NUMERIC(key, length, func) { \
register char *tmp=key; \
\
if (*tmp=='-') { \
tmp++; \
} \
if ((*tmp>='0' && *tmp<='9')) do { /* possibly a numeric index */ \
char *end=key+length-1; \
long idx; \
\
if (*tmp++=='0' && length>2) { /* don't accept numbers with leading zeros */ \
break; \
} \
while (tmp<end) { \
if (!(*tmp>='0' && *tmp<='9')) { \
break; \
} \
tmp++; \
} \
if (tmp==end && *tmp=='\0') { /* a numeric index */ \
if (*key=='-') { \
idx = strtol(key, NULL, 10); \
if (idx!=LONG_MIN) { \
return func; \
} \
} else { \
idx = strtol(key, NULL, 10); \
if (idx!=LONG_MAX) { \
return func; \
} \
} \
} \
} while (0); \
}
#define HANDLE_NUMERIC(key, length, func) do { \
register const char *tmp = key; \
\
if (*tmp == '-') { \
tmp++; \
} \
if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */ \
const char *end = key + length - 1; \
long idx; \
\
if ((*end != '\0') /* not a null terminated string */ \
|| (*tmp == '0' && length > 2) /* numbers with leading zeros */ \
|| (end - tmp > MAX_LENGTH_OF_LONG - 1) /* number too long */ \
|| (SIZEOF_LONG == 4 && \
end - tmp == MAX_LENGTH_OF_LONG - 1 && \
*tmp > '2')) { /* overflow */ \
break; \
} \
idx = (*tmp - '0'); \
while (++tmp != end && *tmp >= '0' && *tmp <= '9') { \
idx = (idx * 10) + (*tmp - '0'); \
} \
if (tmp == end) { \
if (*key == '-') { \
idx = -idx; \
if (idx > 0) { /* overflow */ \
break; \
} \
} else if (idx < 0) { /* overflow */ \
break; \
} \
return func; \
} \
} \
} while (0)
static inline int zend_symtable_update(HashTable *ht, char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest) \
@@ -343,7 +344,7 @@ static inline int zend_symtable_update(HashTable *ht, char *arKey, uint nKeyLeng
static inline int zend_symtable_del(HashTable *ht, char *arKey, uint nKeyLength)
{
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx))
HANDLE_NUMERIC(arKey, nKeyLength, zend_hash_index_del(ht, idx));
return zend_hash_del(ht, arKey, nKeyLength);
}
+2 -23
View File
@@ -148,19 +148,11 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
zend_printf("<span style=\"color: %s\">", last_color);
}
}
switch (token_type) {
case T_END_HEREDOC:
zend_html_puts(token.value.str.val, token.value.str.len TSRMLS_CC);
break;
default:
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
break;
}
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(yy_leng) TSRMLS_CC);
if (token.type == IS_STRING) {
switch (token_type) {
case EOF:
goto done;
case T_OPEN_TAG:
case T_OPEN_TAG_WITH_ECHO:
case T_CLOSE_TAG:
@@ -178,19 +170,6 @@ ZEND_API void zend_highlight(zend_syntax_highlighter_ini *syntax_highlighter_ini
token.type = 0;
}
/* handler for trailing comments, see bug #42767 */
if (LANG_SCNG(yy_leng) && LANG_SCNG(_yy_more_len)) {
if (last_color != syntax_highlighter_ini->highlight_comment) {
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("</span>");
}
if (syntax_highlighter_ini->highlight_comment != syntax_highlighter_ini->highlight_html) {
zend_printf("<span style=\"color: %s\">", syntax_highlighter_ini->highlight_comment);
}
}
zend_html_puts(LANG_SCNG(yy_text), LANG_SCNG(_yy_more_len) TSRMLS_CC);
}
done:
if (last_color != syntax_highlighter_ini->highlight_html) {
zend_printf("</span>\n");
}
+12 -3
View File
@@ -46,15 +46,21 @@ static int zend_remove_ini_entries(zend_ini_entry *ini_entry, int *module_number
static int zend_restore_ini_entry_cb(zend_ini_entry *ini_entry, int stage TSRMLS_DC) /* {{{ */
{
int result = FAILURE;
if (ini_entry->modified) {
if (ini_entry->on_modify) {
zend_try {
/* even if on_modify bails out, we have to continue on with restoring,
since there can be allocated variables that would be freed on MM shutdown
and would lead to memory corruption later ini entry is modified again */
ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC);
result = ini_entry->on_modify(ini_entry, ini_entry->orig_value, ini_entry->orig_value_length, ini_entry->mh_arg1, ini_entry->mh_arg2, ini_entry->mh_arg3, stage TSRMLS_CC);
} zend_end_try();
}
if (stage == ZEND_INI_STAGE_RUNTIME && result == FAILURE) {
/* runtime failure is OK */
return 1;
}
if (ini_entry->value != ini_entry->orig_value) {
efree(ini_entry->value);
}
@@ -310,8 +316,11 @@ ZEND_API int zend_restore_ini_entry(char *name, uint name_length, int stage) /*
}
if (EG(modified_ini_directives)) {
zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC);
zend_hash_del(EG(modified_ini_directives), name, name_length);
if (zend_restore_ini_entry_cb(ini_entry, stage TSRMLS_CC) == 0) {
zend_hash_del(EG(modified_ini_directives), name, name_length);
} else {
return FAILURE;
}
}
return SUCCESS;
+3 -1
View File
@@ -2033,7 +2033,9 @@ wrong_label:
<ST_COMMENT,ST_DOC_COMMENT><<EOF>> {
zend_error(E_COMPILE_WARNING,"Unterminated comment starting line %d", CG(comment_start_line));
return 0;
yyless(yyleng - 1);
BEGIN(ST_IN_SCRIPTING);
return T_COMMENT;
}
+80 -80
View File
@@ -37,8 +37,8 @@ static zend_encoding* zend_multibyte_detect_utf_encoding(char *script, int scrip
/*
* encodings
*/
const char *ucs2_aliases[] = {"ISO-10646-UCS-2", "UCS2" , "UNICODE", NULL};
zend_encoding encoding_ucs2 = {
static const char *ucs2_aliases[] = {"ISO-10646-UCS-2", "UCS2" , "UNICODE", NULL};
static zend_encoding encoding_ucs2 = {
NULL,
NULL,
"UCS-2",
@@ -46,7 +46,7 @@ zend_encoding encoding_ucs2 = {
0
};
zend_encoding encoding_ucs2be = {
static zend_encoding encoding_ucs2be = {
NULL,
NULL,
"UCS-2BE",
@@ -54,7 +54,7 @@ zend_encoding encoding_ucs2be = {
0
};
zend_encoding encoding_ucs2le = {
static zend_encoding encoding_ucs2le = {
NULL,
NULL,
"UCS-2LE",
@@ -62,8 +62,8 @@ zend_encoding encoding_ucs2le = {
0
};
const char *ucs4_aliases[] = {"ISO-10646-UCS-4", "UCS4", NULL};
zend_encoding encoding_ucs4 = {
static const char *ucs4_aliases[] = {"ISO-10646-UCS-4", "UCS4", NULL};
static zend_encoding encoding_ucs4 = {
NULL,
NULL,
"UCS-4",
@@ -71,7 +71,7 @@ zend_encoding encoding_ucs4 = {
0
};
zend_encoding encoding_ucs4be = {
static zend_encoding encoding_ucs4be = {
NULL,
NULL,
"UCS-4BE",
@@ -79,7 +79,7 @@ zend_encoding encoding_ucs4be = {
0
};
zend_encoding encoding_ucs4le = {
static zend_encoding encoding_ucs4le = {
NULL,
NULL,
"UCS-4LE",
@@ -87,8 +87,8 @@ zend_encoding encoding_ucs4le = {
0
};
const char *utf32_aliases[] = {"utf32", NULL};
zend_encoding encoding_utf32 = {
static const char *utf32_aliases[] = {"utf32", NULL};
static zend_encoding encoding_utf32 = {
NULL,
NULL,
"UTF-32",
@@ -96,7 +96,7 @@ zend_encoding encoding_utf32 = {
0
};
zend_encoding encoding_utf32be = {
static zend_encoding encoding_utf32be = {
NULL,
NULL,
"UTF-32BE",
@@ -104,7 +104,7 @@ zend_encoding encoding_utf32be = {
0
};
zend_encoding encoding_utf32le = {
static zend_encoding encoding_utf32le = {
NULL,
NULL,
"UTF-32LE",
@@ -112,8 +112,8 @@ zend_encoding encoding_utf32le = {
0
};
const char *utf16_aliases[] = {"utf16", NULL};
zend_encoding encoding_utf16 = {
static const char *utf16_aliases[] = {"utf16", NULL};
static zend_encoding encoding_utf16 = {
NULL,
NULL,
"UTF-16",
@@ -121,7 +121,7 @@ zend_encoding encoding_utf16 = {
0
};
zend_encoding encoding_utf16be = {
static zend_encoding encoding_utf16be = {
NULL,
NULL,
"UTF-16BE",
@@ -129,7 +129,7 @@ zend_encoding encoding_utf16be = {
0
};
zend_encoding encoding_utf16le = {
static zend_encoding encoding_utf16le = {
NULL,
NULL,
"UTF-16LE",
@@ -137,8 +137,8 @@ zend_encoding encoding_utf16le = {
0
};
const char *utf8_aliases[] = {"utf8", NULL};
zend_encoding encoding_utf8 = {
static const char *utf8_aliases[] = {"utf8", NULL};
static zend_encoding encoding_utf8 = {
NULL,
NULL,
"UTF-8",
@@ -146,8 +146,8 @@ zend_encoding encoding_utf8 = {
1
};
const char *ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "cp367", "csASCII", NULL};
zend_encoding encoding_ascii = {
static const char *ascii_aliases[] = {"ANSI_X3.4-1968", "iso-ir-6", "ANSI_X3.4-1986", "ISO_646.irv:1991", "US-ASCII", "ISO646-US", "us", "IBM367", "cp367", "csASCII", NULL};
static zend_encoding encoding_ascii = {
NULL,
NULL,
"ASCII",
@@ -155,8 +155,8 @@ zend_encoding encoding_ascii = {
1
};
const char *euc_jp_aliases[] = {"EUC", "EUC_JP", "eucJP", "x-euc-jp", NULL};
zend_encoding encoding_euc_jp = {
static const char *euc_jp_aliases[] = {"EUC", "EUC_JP", "eucJP", "x-euc-jp", NULL};
static zend_encoding encoding_euc_jp = {
NULL,
NULL,
"EUC-JP",
@@ -164,8 +164,8 @@ zend_encoding encoding_euc_jp = {
1
};
const char *sjis_aliases[] = {"x-sjis", "SJIS", "SHIFT-JIS", NULL};
zend_encoding encoding_sjis = {
static const char *sjis_aliases[] = {"x-sjis", "SJIS", "SHIFT-JIS", NULL};
static zend_encoding encoding_sjis = {
sjis_input_filter,
sjis_output_filter,
"Shift_JIS",
@@ -173,8 +173,8 @@ zend_encoding encoding_sjis = {
0
};
const char *eucjp_win_aliases[] = {"eucJP-open", NULL};
zend_encoding encoding_eucjp_win = {
static const char *eucjp_win_aliases[] = {"eucJP-open", NULL};
static zend_encoding encoding_eucjp_win = {
NULL,
NULL,
"eucJP-win",
@@ -182,8 +182,8 @@ zend_encoding encoding_eucjp_win = {
1
};
const char *sjis_win_aliases[] = {"SJIS-open", "MS_Kanji", "Windows-31J", "CP932", NULL};
zend_encoding encoding_sjis_win = {
static const char *sjis_win_aliases[] = {"SJIS-open", "MS_Kanji", "Windows-31J", "CP932", NULL};
static zend_encoding encoding_sjis_win = {
/* sjis-filters does not care about diffs of Shift_JIS and CP932 */
sjis_input_filter,
sjis_output_filter,
@@ -192,8 +192,8 @@ zend_encoding encoding_sjis_win = {
0
};
const char *jis_aliases[] = {"ISO-2022-JP", NULL};
zend_encoding encoding_jis = {
static const char *jis_aliases[] = {"ISO-2022-JP", NULL};
static zend_encoding encoding_jis = {
NULL,
NULL,
"JIS",
@@ -201,8 +201,8 @@ zend_encoding encoding_jis = {
0
};
const char *euc_cn_aliases[] = {"CN-GB", "EUC_CN", "eucCN", "x-euc-cn", "gb2312", NULL};
zend_encoding encoding_euc_cn = {
static const char *euc_cn_aliases[] = {"CN-GB", "EUC_CN", "eucCN", "x-euc-cn", "gb2312", NULL};
static zend_encoding encoding_euc_cn = {
NULL,
NULL,
"EUC-CN",
@@ -210,8 +210,8 @@ zend_encoding encoding_euc_cn = {
1
};
const char *cp936_aliases[] = {"CP-936", NULL};
zend_encoding encoding_cp936 = {
static const char *cp936_aliases[] = {"CP-936", NULL};
static zend_encoding encoding_cp936 = {
NULL,
NULL,
"CP936",
@@ -219,8 +219,8 @@ zend_encoding encoding_cp936 = {
0
};
const char *hz_aliases[] = {"HZ-GB-2312", NULL};
zend_encoding encoding_hz = {
static const char *hz_aliases[] = {"HZ-GB-2312", NULL};
static zend_encoding encoding_hz = {
NULL,
NULL,
"HZ",
@@ -228,8 +228,8 @@ zend_encoding encoding_hz = {
0
};
const char *euc_tw_aliases[] = {"EUC_TW", "eucTW", "x-euc-tw", NULL};
zend_encoding encoding_euc_tw = {
static const char *euc_tw_aliases[] = {"EUC_TW", "eucTW", "x-euc-tw", NULL};
static zend_encoding encoding_euc_tw = {
NULL,
NULL,
"EUC-TW",
@@ -237,8 +237,8 @@ zend_encoding encoding_euc_tw = {
1
};
const char *big5_aliases[] = {"BIG5", "CN-BIG5", "BIG-FIVE", "BIGFIVE", "CP950", NULL};
zend_encoding encoding_big5 = {
static const char *big5_aliases[] = {"BIG5", "CN-BIG5", "BIG-FIVE", "BIGFIVE", "CP950", NULL};
static zend_encoding encoding_big5 = {
NULL,
NULL,
"BIG-5",
@@ -246,8 +246,8 @@ zend_encoding encoding_big5 = {
0
};
const char *euc_kr_aliases[] = {"EUC_KR", "eucKR", "x-euc-kr", NULL};
zend_encoding encoding_euc_kr = {
static const char *euc_kr_aliases[] = {"EUC_KR", "eucKR", "x-euc-kr", NULL};
static zend_encoding encoding_euc_kr = {
NULL,
NULL,
"EUC-KR",
@@ -255,8 +255,8 @@ zend_encoding encoding_euc_kr = {
1
};
const char *uhc_aliases[] = {"CP949", NULL};
zend_encoding encoding_uhc = {
static const char *uhc_aliases[] = {"CP949", NULL};
static zend_encoding encoding_uhc = {
NULL,
NULL,
"UHC",
@@ -264,7 +264,7 @@ zend_encoding encoding_uhc = {
1
};
zend_encoding encoding_2022kr = {
static zend_encoding encoding_2022kr = {
NULL,
NULL,
"ISO-2022-KR",
@@ -272,8 +272,8 @@ zend_encoding encoding_2022kr = {
0
};
const char *cp1252_aliases[] = {"cp1252", NULL};
zend_encoding encoding_cp1252 = {
static const char *cp1252_aliases[] = {"cp1252", NULL};
static zend_encoding encoding_cp1252 = {
NULL,
NULL,
"Windows-1252",
@@ -281,8 +281,8 @@ zend_encoding encoding_cp1252 = {
1
};
const char *iso_8859_1_aliases[] = {"ISO_8859-1", "latin1", NULL};
zend_encoding encoding_8859_1 = {
static const char *iso_8859_1_aliases[] = {"ISO_8859-1", "latin1", NULL};
static zend_encoding encoding_8859_1 = {
NULL,
NULL,
"ISO-8859-1",
@@ -290,8 +290,8 @@ zend_encoding encoding_8859_1 = {
1
};
const char *iso_8859_2_aliases[] = {"ISO_8859-2", "latin2", NULL};
zend_encoding encoding_8859_2 = {
static const char *iso_8859_2_aliases[] = {"ISO_8859-2", "latin2", NULL};
static zend_encoding encoding_8859_2 = {
NULL,
NULL,
"ISO-8859-2",
@@ -299,8 +299,8 @@ zend_encoding encoding_8859_2 = {
1
};
const char *iso_8859_3_aliases[] = {"ISO_8859-3", "latin3", NULL};
zend_encoding encoding_8859_3 = {
static const char *iso_8859_3_aliases[] = {"ISO_8859-3", "latin3", NULL};
static zend_encoding encoding_8859_3 = {
NULL,
NULL,
"ISO-8859-3",
@@ -308,8 +308,8 @@ zend_encoding encoding_8859_3 = {
1
};
const char *iso_8859_4_aliases[] = {"ISO_8859-4", "latin4", NULL};
zend_encoding encoding_8859_4 = {
static const char *iso_8859_4_aliases[] = {"ISO_8859-4", "latin4", NULL};
static zend_encoding encoding_8859_4 = {
NULL,
NULL,
"ISO-8859-4",
@@ -317,8 +317,8 @@ zend_encoding encoding_8859_4 = {
1
};
const char *iso_8859_5_aliases[] = {"ISO_8859-5", "cyrillic", NULL};
zend_encoding encoding_8859_5 = {
static const char *iso_8859_5_aliases[] = {"ISO_8859-5", "cyrillic", NULL};
static zend_encoding encoding_8859_5 = {
NULL,
NULL,
"ISO-8859-5",
@@ -326,8 +326,8 @@ zend_encoding encoding_8859_5 = {
1
};
const char *iso_8859_6_aliases[] = {"ISO_8859-6", "arabic", NULL};
zend_encoding encoding_8859_6 = {
static const char *iso_8859_6_aliases[] = {"ISO_8859-6", "arabic", NULL};
static zend_encoding encoding_8859_6 = {
NULL,
NULL,
"ISO-8859-6",
@@ -335,8 +335,8 @@ zend_encoding encoding_8859_6 = {
1
};
const char *iso_8859_7_aliases[] = {"ISO_8859-7", "greek", NULL};
zend_encoding encoding_8859_7 = {
static const char *iso_8859_7_aliases[] = {"ISO_8859-7", "greek", NULL};
static zend_encoding encoding_8859_7 = {
NULL,
NULL,
"ISO-8859-7",
@@ -344,8 +344,8 @@ zend_encoding encoding_8859_7 = {
1
};
const char *iso_8859_8_aliases[] = {"ISO_8859-8", "hebrew", NULL};
zend_encoding encoding_8859_8 = {
static const char *iso_8859_8_aliases[] = {"ISO_8859-8", "hebrew", NULL};
static zend_encoding encoding_8859_8 = {
NULL,
NULL,
"ISO-8859-8",
@@ -353,8 +353,8 @@ zend_encoding encoding_8859_8 = {
1
};
const char *iso_8859_9_aliases[] = {"ISO_8859-9", "latin5", NULL};
zend_encoding encoding_8859_9 = {
static const char *iso_8859_9_aliases[] = {"ISO_8859-9", "latin5", NULL};
static zend_encoding encoding_8859_9 = {
NULL,
NULL,
"ISO-8859-9",
@@ -362,8 +362,8 @@ zend_encoding encoding_8859_9 = {
1
};
const char *iso_8859_10_aliases[] = {"ISO_8859-10", "latin6", NULL};
zend_encoding encoding_8859_10 = {
static const char *iso_8859_10_aliases[] = {"ISO_8859-10", "latin6", NULL};
static zend_encoding encoding_8859_10 = {
NULL,
NULL,
"ISO-8859-10",
@@ -371,8 +371,8 @@ zend_encoding encoding_8859_10 = {
1
};
const char *iso_8859_13_aliases[] = {"ISO_8859-13", NULL};
zend_encoding encoding_8859_13 = {
static const char *iso_8859_13_aliases[] = {"ISO_8859-13", NULL};
static zend_encoding encoding_8859_13 = {
NULL,
NULL,
"ISO-8859-13",
@@ -380,8 +380,8 @@ zend_encoding encoding_8859_13 = {
1
};
const char *iso_8859_14_aliases[] = {"ISO_8859-14", "latin8", NULL};
zend_encoding encoding_8859_14 = {
static const char *iso_8859_14_aliases[] = {"ISO_8859-14", "latin8", NULL};
static zend_encoding encoding_8859_14 = {
NULL,
NULL,
"ISO-8859-14",
@@ -389,8 +389,8 @@ zend_encoding encoding_8859_14 = {
1
};
const char *iso_8859_15_aliases[] = {"ISO_8859-15", NULL};
zend_encoding encoding_8859_15 = {
static const char *iso_8859_15_aliases[] = {"ISO_8859-15", NULL};
static zend_encoding encoding_8859_15 = {
NULL,
NULL,
"ISO-8859-15",
@@ -398,8 +398,8 @@ zend_encoding encoding_8859_15 = {
1
};
const char *cp1251_aliases[] = {"CP1251", "CP-1251", "WINDOWS-1251", NULL};
zend_encoding encoding_cp1251 = {
static const char *cp1251_aliases[] = {"CP1251", "CP-1251", "WINDOWS-1251", NULL};
static zend_encoding encoding_cp1251 = {
NULL,
NULL,
"Windows-1251",
@@ -407,8 +407,8 @@ zend_encoding encoding_cp1251 = {
1
};
const char *cp866_aliases[] = {"CP866", "CP-866", "IBM-866", NULL};
zend_encoding encoding_cp866 = {
static const char *cp866_aliases[] = {"CP866", "CP-866", "IBM-866", NULL};
static zend_encoding encoding_cp866 = {
NULL,
NULL,
"CP866",
@@ -416,8 +416,8 @@ zend_encoding encoding_cp866 = {
1
};
const char *koi8r_aliases[] = {"KOI8-R", "KOI8R", NULL};
zend_encoding encoding_koi8r = {
static const char *koi8r_aliases[] = {"KOI8-R", "KOI8R", NULL};
static zend_encoding encoding_koi8r = {
NULL,
NULL,
"KOI8-R",
@@ -425,7 +425,7 @@ zend_encoding encoding_koi8r = {
1
};
zend_encoding *zend_encoding_table[] = {
static zend_encoding *zend_encoding_table[] = {
&encoding_ucs4,
&encoding_ucs4be,
&encoding_ucs4le,
+18 -24
View File
@@ -564,8 +564,8 @@ static zval **zend_std_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC
zend_guard *guard;
if (!zobj->ce->__get ||
zend_get_property_guard(zobj, property_info, member, &guard) != SUCCESS ||
guard->in_get) {
zend_get_property_guard(zobj, property_info, member, &guard) != SUCCESS ||
(property_info && guard->in_get)) {
/* we don't have access controls - will just add it */
new_zval = &EG(uninitialized_zval);
@@ -762,15 +762,15 @@ static inline zend_class_entry * zend_get_function_root_class(zend_function *fbc
}
static inline union _zend_function *zend_get_user_call_function(zend_object *zobj, char *method_name, int method_len) /* {{{ */
static inline union _zend_function *zend_get_user_call_function(zend_class_entry *ce, const char *method_name, int method_len) /* {{{ */
{
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
call_user_call->type = ZEND_INTERNAL_FUNCTION;
call_user_call->module = zobj->ce->module;
call_user_call->module = ce->module;
call_user_call->handler = zend_std_call_user_call;
call_user_call->arg_info = NULL;
call_user_call->num_args = 0;
call_user_call->scope = zobj->ce;
call_user_call->scope = ce;
call_user_call->fn_flags = 0;
call_user_call->function_name = estrndup(method_name, method_len);
call_user_call->pass_rest_by_reference = 0;
@@ -796,7 +796,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&fbc) == FAILURE) {
free_alloca_with_limit(lc_method_name, use_heap);
if (zobj->ce->__call) {
return zend_get_user_call_function(zobj, method_name, method_len);
return zend_get_user_call_function(zobj->ce, method_name, method_len);
} else {
return NULL;
}
@@ -814,7 +814,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
fbc = updated_fbc;
} else {
if (zobj->ce->__call) {
fbc = zend_get_user_call_function(zobj, method_name, method_len);
fbc = zend_get_user_call_function(zobj->ce, method_name, method_len);
} else {
zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)->name : "");
}
@@ -840,7 +840,7 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
*/
if (!zend_check_protected(zend_get_function_root_class(fbc), EG(scope))) {
if (zobj->ce->__call) {
fbc = zend_get_user_call_function(zobj, method_name, method_len);
fbc = zend_get_user_call_function(zobj->ce, method_name, method_len);
} else {
zend_error(E_ERROR, "Call to %s method %s::%s() from context '%s'", zend_visibility_string(fbc->common.fn_flags), ZEND_FN_SCOPE_NAME(fbc), method_name, EG(scope) ? EG(scope)->name : "");
}
@@ -856,27 +856,19 @@ static union _zend_function *zend_std_get_method(zval **object_ptr, char *method
/* This is not (yet?) in the API, but it belongs in the built-in objects callbacks */
ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *function_name_strval, int function_name_strlen TSRMLS_DC)
{
zend_function *fbc;
char *lc_function_name;
zend_function *fbc;
lc_function_name = zend_str_tolower_dup(function_name_strval, function_name_strlen);
if (zend_hash_find(&ce->function_table, lc_function_name, function_name_strlen+1, (void **) &fbc)==FAILURE) {
efree(lc_function_name);
if (zend_hash_find(&ce->function_table, function_name_strval, function_name_strlen+1, (void **) &fbc)==FAILURE) {
if (ce->__call &&
EG(This) &&
Z_OBJ_HT_P(EG(This))->get_class_entry &&
instanceof_function(Z_OBJCE_P(EG(This)), ce TSRMLS_CC)) {
zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
call_user_call->type = ZEND_INTERNAL_FUNCTION;
call_user_call->module = ce->module;
call_user_call->handler = zend_std_call_user_call;
call_user_call->arg_info = NULL;
call_user_call->num_args = 0;
call_user_call->scope = ce;
call_user_call->fn_flags = 0;
call_user_call->function_name = estrndup(function_name_strval, function_name_strlen);
call_user_call->pass_rest_by_reference = 0;
call_user_call->return_reference = ZEND_RETURN_VALUE;
return (union _zend_function *)call_user_call;
return zend_get_user_call_function(ce, function_name_strval, function_name_strlen);
} else {
char *class_name = ce->name;
@@ -886,6 +878,8 @@ ZEND_API zend_function *zend_std_get_static_method(zend_class_entry *ce, char *f
zend_error(E_ERROR, "Call to undefined method %s::%s()", class_name, function_name_strval);
}
}
efree(lc_function_name);
if (fbc->op_array.fn_flags & ZEND_ACC_PUBLIC) {
/* No further checks necessary, most common case */
} else if (fbc->op_array.fn_flags & ZEND_ACC_PRIVATE) {
+1 -1
View File
@@ -49,7 +49,7 @@ ZEND_API void zend_object_std_dtor(zend_object *object TSRMLS_DC)
ZEND_API void zend_objects_destroy_object(zend_object *object, zend_object_handle handle TSRMLS_DC)
{
zend_function *destructor = object->ce->destructor;
zend_function *destructor = object ? object->ce->destructor : NULL;
if (destructor) {
zval *obj;
+6
View File
@@ -1202,6 +1202,12 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC)
}
if (result==op1) { /* special case, perform operations on result */
uint res_len = op1->value.str.len + op2->value.str.len;
if (Z_STRLEN_P(result) < 0 || (int) (Z_STRLEN_P(op1) + Z_STRLEN_P(op2)) < 0) {
efree(Z_STRVAL_P(result));
ZVAL_EMPTY_STRING(result);
zend_error(E_ERROR, "String size overflow");
}
result->value.str.val = erealloc(result->value.str.val, res_len+1);
-12
View File
@@ -36,18 +36,6 @@
#include "ext/bcmath/libbcmath/src/bcmath.h"
#endif
#if SIZEOF_LONG == 4
#define MAX_LENGTH_OF_LONG 11
static const char long_min_digits[] = "2147483648";
#elif SIZEOF_LONG == 8
#define MAX_LENGTH_OF_LONG 20
static const char long_min_digits[] = "9223372036854775808";
#else
#error "Unknown SIZEOF_LONG"
#endif
#define MAX_LENGTH_OF_DOUBLE 32
BEGIN_EXTERN_C()
ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
ZEND_API int sub_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
+20 -20
View File
@@ -26,8 +26,7 @@
#include "zend_constants.h"
#include "zend_list.h"
ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC)
ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
{
switch (zvalue->type & ~IS_CONSTANT_INDEX) {
case IS_STRING:
@@ -69,9 +68,9 @@ ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC)
break;
}
}
/* }}} */
ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC)
ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
{
switch (zvalue->type & ~IS_CONSTANT_INDEX) {
case IS_STRING:
@@ -93,15 +92,15 @@ ZEND_API void _zval_internal_dtor(zval *zvalue ZEND_FILE_LINE_DC)
break;
}
}
/* }}} */
ZEND_API void zval_add_ref(zval **p)
ZEND_API void zval_add_ref(zval **p) /* {{{ */
{
(*p)->refcount++;
}
/* }}} */
ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC) /* {{{ */
{
switch (zvalue->type) {
case IS_RESOURCE: {
@@ -143,43 +142,44 @@ ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
break;
}
}
/* }}} */
ZEND_API int zend_print_variable(zval *var)
ZEND_API int zend_print_variable(zval *var) /* {{{ */
{
return zend_print_zval(var, 0);
}
/* }}} */
#if ZEND_DEBUG
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue)
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue) /* {{{ */
{
zval_copy_ctor(zvalue);
}
/* }}} */
ZEND_API void _zval_dtor_wrapper(zval *zvalue)
ZEND_API void _zval_dtor_wrapper(zval *zvalue) /* {{{ */
{
zval_dtor(zvalue);
}
/* }}} */
ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue)
ZEND_API void _zval_internal_dtor_wrapper(zval *zvalue) /* {{{ */
{
zval_internal_dtor(zvalue);
}
/* }}} */
ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr)
ZEND_API void _zval_ptr_dtor_wrapper(zval **zval_ptr) /* {{{ */
{
zval_ptr_dtor(zval_ptr);
}
/* }}} */
ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zval_ptr)
ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zval_ptr) /* {{{ */
{
zval_internal_ptr_dtor(zval_ptr);
}
/* }}} */
#endif
/*
+8 -8
View File
@@ -29,20 +29,20 @@ ZEND_API void _zval_dtor_func(zval *zvalue ZEND_FILE_LINE_DC);
static inline void _zval_dtor(zval *zvalue ZEND_FILE_LINE_DC)
{
if (zvalue->type <= IS_BOOL) {
return;
}
_zval_dtor_func(zvalue ZEND_FILE_LINE_CC);
if (zvalue->type <= IS_BOOL) {
return;
}
_zval_dtor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
}
ZEND_API void _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC);
static inline void _zval_copy_ctor(zval *zvalue ZEND_FILE_LINE_DC)
{
if (zvalue->type <= IS_BOOL) {
return;
}
_zval_copy_ctor_func(zvalue ZEND_FILE_LINE_CC);
if (zvalue->type <= IS_BOOL) {
return;
}
_zval_copy_ctor_func(zvalue ZEND_FILE_LINE_RELAY_CC);
}
+37 -11
View File
@@ -294,6 +294,10 @@ ZEND_VM_HELPER_EX(zend_binary_assign_op_obj_helper, VAR|UNUSED|CV, CONST|TMP|VAR
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (OP1_TYPE == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -545,6 +549,10 @@ ZEND_VM_HELPER_EX(zend_pre_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR|
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (OP1_TYPE == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -637,6 +645,10 @@ ZEND_VM_HELPER_EX(zend_post_incdec_property_helper, VAR|UNUSED|CV, CONST|TMP|VAR
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (OP1_TYPE == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -927,6 +939,7 @@ ZEND_VM_HELPER_EX(zend_fetch_var_address_helper, CONST|TMP|VAR|CV, ANY, int type
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
FREE_OP1();
} else {
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
/*
@@ -1783,7 +1796,7 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, ANY, CONST|TMP|VAR|UNUSED|CV)
ce = EX_T(opline->op1.u.var).class_entry;
if(OP2_TYPE != IS_UNUSED) {
char *function_name_strval;
char *function_name_strval = NULL;
int function_name_strlen;
zend_bool is_const = (OP2_TYPE == IS_CONST);
zend_free_op free_op2;
@@ -1796,15 +1809,17 @@ ZEND_VM_HANDLER(113, ZEND_INIT_STATIC_METHOD_CALL, ANY, CONST|TMP|VAR|UNUSED|CV)
if (Z_TYPE_P(function_name) != IS_STRING) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
}
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
function_name_strlen = function_name->value.str.len;
}
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
if (function_name_strval) {
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
}
if (!is_const) {
efree(function_name_strval);
FREE_OP2();
}
} else {
@@ -2070,7 +2085,7 @@ ZEND_VM_HELPER(zend_do_fcall_common_helper, ANY, ANY)
EG(This) = current_this;
EG(scope) = current_scope;
}
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
zend_ptr_stack_clear_multiple(TSRMLS_C);
@@ -2357,6 +2372,10 @@ ZEND_VM_HANDLER(67, ZEND_SEND_REF, VAR|CV, ANY)
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
ZEND_VM_DISPATCH_TO_HELPER(zend_send_by_var_helper);
}
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
varptr = *varptr_ptr;
varptr->refcount++;
@@ -3182,15 +3201,22 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
ALLOC_ZVAL(tmp);
INIT_PZVAL_COPY(tmp, array_ptr);
array_ptr = tmp;
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (ce && ce->get_iterator) {
array_ptr->refcount--;
}
}
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (!ce || !ce->get_iterator) {
array_ptr->refcount++;
}
} else {
if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
if (OP1_TYPE == IS_CONST ||
((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
array_ptr->refcount > 1)) {
zval *tmp;
ALLOC_ZVAL(tmp);
@@ -3203,7 +3229,7 @@ ZEND_VM_HANDLER(77, ZEND_FE_RESET, CONST|TMP|VAR|CV, ANY)
}
}
if (OP1_TYPE != IS_TMP_VAR && ce && ce->get_iterator) {
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
if (iter && !EG(exception)) {
@@ -3506,7 +3532,7 @@ ZEND_VM_HELPER_EX(zend_isset_isempty_dim_prop_obj_handler, VAR|UNUSED|CV, CONST|
zend_free_op free_op2;
zval *offset = GET_OP2_ZVAL_PTR(BP_VAR_R);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -3842,7 +3868,7 @@ ZEND_VM_HANDLER(149, ZEND_HANDLE_EXCEPTION, ANY, ANY)
}
zval_ptr_dtor(&EX(object));
}
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
}
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
+257 -51
View File
@@ -302,7 +302,7 @@ static int zend_do_fcall_common_helper_SPEC(ZEND_OPCODE_HANDLER_ARGS)
EG(This) = current_this;
EG(scope) = current_scope;
}
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
zend_ptr_stack_clear_multiple(TSRMLS_C);
@@ -562,7 +562,7 @@ static int ZEND_HANDLE_EXCEPTION_SPEC_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
zval_ptr_dtor(&EX(object));
}
zend_ptr_stack_2_pop(&EG(arg_types_stack), (void**)&EX(object), (void**)&EX(fbc));
zend_arg_types_stack_2_pop(&EG(arg_types_stack), &EX(object), &EX(fbc));
}
for (i=0; i<EX(op_array)->last_brk_cont; i++) {
@@ -667,7 +667,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
ce = EX_T(opline->op1.u.var).class_entry;
if(IS_CONST != IS_UNUSED) {
char *function_name_strval;
char *function_name_strval = NULL;
int function_name_strlen;
zend_bool is_const = (IS_CONST == IS_CONST);
@@ -680,15 +680,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_A
if (Z_TYPE_P(function_name) != IS_STRING) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
}
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
function_name_strlen = function_name->value.str.len;
}
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
if (function_name_strval) {
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
}
if (!is_const) {
efree(function_name_strval);
}
} else {
@@ -878,7 +880,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
ce = EX_T(opline->op1.u.var).class_entry;
if(IS_TMP_VAR != IS_UNUSED) {
char *function_name_strval;
char *function_name_strval = NULL;
int function_name_strlen;
zend_bool is_const = (IS_TMP_VAR == IS_CONST);
zend_free_op free_op2;
@@ -891,15 +893,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (Z_TYPE_P(function_name) != IS_STRING) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
}
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
function_name_strlen = function_name->value.str.len;
}
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
if (function_name_strval) {
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
}
if (!is_const) {
efree(function_name_strval);
zval_dtor(free_op2.var);
}
} else {
@@ -1049,7 +1053,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
ce = EX_T(opline->op1.u.var).class_entry;
if(IS_VAR != IS_UNUSED) {
char *function_name_strval;
char *function_name_strval = NULL;
int function_name_strlen;
zend_bool is_const = (IS_VAR == IS_CONST);
zend_free_op free_op2;
@@ -1062,15 +1066,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARG
if (Z_TYPE_P(function_name) != IS_STRING) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
}
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
function_name_strlen = function_name->value.str.len;
}
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
if (function_name_strval) {
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
}
if (!is_const) {
efree(function_name_strval);
if (free_op2.var) {zval_ptr_dtor(&free_op2.var);};
}
} else {
@@ -1219,7 +1225,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_
ce = EX_T(opline->op1.u.var).class_entry;
if(IS_UNUSED != IS_UNUSED) {
char *function_name_strval;
char *function_name_strval = NULL;
int function_name_strlen;
zend_bool is_const = (IS_UNUSED == IS_CONST);
@@ -1232,15 +1238,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_UNUSED_HANDLER(ZEND_OPCODE_HANDLER_
if (Z_TYPE_P(function_name) != IS_STRING) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
}
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
function_name_strlen = function_name->value.str.len;
}
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
if (function_name_strval) {
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
}
if (!is_const) {
efree(function_name_strval);
}
} else {
@@ -1322,7 +1330,7 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
ce = EX_T(opline->op1.u.var).class_entry;
if(IS_CV != IS_UNUSED) {
char *function_name_strval;
char *function_name_strval = NULL;
int function_name_strlen;
zend_bool is_const = (IS_CV == IS_CONST);
@@ -1335,15 +1343,17 @@ static int ZEND_INIT_STATIC_METHOD_CALL_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS
if (Z_TYPE_P(function_name) != IS_STRING) {
zend_error_noreturn(E_ERROR, "Function name must be a string");
} else {
function_name_strval = Z_STRVAL_P(function_name);
function_name_strlen = Z_STRLEN_P(function_name);
}
function_name_strval = zend_str_tolower_dup(function_name->value.str.val, function_name->value.str.len);
function_name_strlen = function_name->value.str.len;
}
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
if (function_name_strval) {
EX(fbc) = zend_std_get_static_method(ce, function_name_strval, function_name_strlen TSRMLS_CC);
}
if (!is_const) {
efree(function_name_strval);
}
} else {
@@ -1521,6 +1531,7 @@ static int zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND_OPCODE_HANDLE
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
} else {
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
/*
@@ -2220,15 +2231,22 @@ static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ALLOC_ZVAL(tmp);
INIT_PZVAL_COPY(tmp, array_ptr);
array_ptr = tmp;
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (ce && ce->get_iterator) {
array_ptr->refcount--;
}
}
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (!ce || !ce->get_iterator) {
array_ptr->refcount++;
}
} else {
if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
if (IS_CONST == IS_CONST ||
((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
array_ptr->refcount > 1)) {
zval *tmp;
ALLOC_ZVAL(tmp);
@@ -2241,7 +2259,7 @@ static int ZEND_FE_RESET_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
}
if (IS_CONST != IS_TMP_VAR && ce && ce->get_iterator) {
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
if (iter && !EG(exception)) {
@@ -4094,6 +4112,7 @@ static int zend_fetch_var_address_helper_SPEC_TMP(int type, ZEND_OPCODE_HANDLER_
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
zval_dtor(free_op1.var);
} else {
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
/*
@@ -4795,15 +4814,22 @@ static int ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ALLOC_ZVAL(tmp);
INIT_PZVAL_COPY(tmp, array_ptr);
array_ptr = tmp;
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (ce && ce->get_iterator) {
array_ptr->refcount--;
}
}
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (!ce || !ce->get_iterator) {
array_ptr->refcount++;
}
} else {
if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
if (IS_TMP_VAR == IS_CONST ||
((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
array_ptr->refcount > 1)) {
zval *tmp;
ALLOC_ZVAL(tmp);
@@ -4816,7 +4842,7 @@ static int ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
}
if (IS_TMP_VAR != IS_TMP_VAR && ce && ce->get_iterator) {
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
if (iter && !EG(exception)) {
@@ -7142,6 +7168,7 @@ static int zend_fetch_var_address_helper_SPEC_VAR(int type, ZEND_OPCODE_HANDLER_
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
if (free_op1.var) {zval_ptr_dtor(&free_op1.var);};
} else {
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
/*
@@ -7560,6 +7587,10 @@ static int ZEND_SEND_REF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
return zend_send_by_var_helper_SPEC_VAR(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
varptr = *varptr_ptr;
varptr->refcount++;
@@ -7944,15 +7975,22 @@ static int ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ALLOC_ZVAL(tmp);
INIT_PZVAL_COPY(tmp, array_ptr);
array_ptr = tmp;
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (ce && ce->get_iterator) {
array_ptr->refcount--;
}
}
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (!ce || !ce->get_iterator) {
array_ptr->refcount++;
}
} else {
if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
if (IS_VAR == IS_CONST ||
((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
array_ptr->refcount > 1)) {
zval *tmp;
ALLOC_ZVAL(tmp);
@@ -7965,7 +8003,7 @@ static int ZEND_FE_RESET_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
}
if (IS_VAR != IS_TMP_VAR && ce && ce->get_iterator) {
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
if (iter && !EG(exception)) {
@@ -8553,6 +8591,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_CONST(int (*binary_op)(zval
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -8803,6 +8845,10 @@ static int zend_pre_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, ZE
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -8895,6 +8941,10 @@ static int zend_post_incdec_property_helper_SPEC_VAR_CONST(incdec_t incdec_op, Z
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -9700,7 +9750,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CONST(int prop_dim,
zval *offset = &opline->op2.u.constant;
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -10070,6 +10120,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_TMP(int (*binary_op)(zval *
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -10321,6 +10375,10 @@ static int zend_pre_incdec_property_helper_SPEC_VAR_TMP(incdec_t incdec_op, ZEND
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -10413,6 +10471,10 @@ static int zend_post_incdec_property_helper_SPEC_VAR_TMP(incdec_t incdec_op, ZEN
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -11221,7 +11283,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_TMP(int prop_dim, ZE
zend_free_op free_op2;
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -11591,6 +11653,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_VAR(int (*binary_op)(zval *
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -11842,6 +11908,10 @@ static int zend_pre_incdec_property_helper_SPEC_VAR_VAR(incdec_t incdec_op, ZEND
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -11934,6 +12004,10 @@ static int zend_post_incdec_property_helper_SPEC_VAR_VAR(incdec_t incdec_op, ZEN
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -12790,7 +12864,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_VAR(int prop_dim, ZE
zend_free_op free_op2;
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -12926,6 +13000,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_UNUSED(int (*binary_op)(zva
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -13607,6 +13685,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_VAR_CV(int (*binary_op)(zval *r
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -13857,6 +13939,10 @@ static int zend_pre_incdec_property_helper_SPEC_VAR_CV(incdec_t incdec_op, ZEND_
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -13949,6 +14035,10 @@ static int zend_post_incdec_property_helper_SPEC_VAR_CV(incdec_t incdec_op, ZEND
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_VAR == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -14800,7 +14890,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_VAR_CV(int prop_dim, ZEN
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -15017,6 +15107,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_CONST(int (*binary_op)(z
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -15266,6 +15360,10 @@ static int zend_pre_incdec_property_helper_SPEC_UNUSED_CONST(incdec_t incdec_op,
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -15358,6 +15456,10 @@ static int zend_post_incdec_property_helper_SPEC_UNUSED_CONST(incdec_t incdec_op
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -15907,7 +16009,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CONST(int prop_di
zval *offset = &opline->op2.u.constant;
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -16041,6 +16143,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_TMP(int (*binary_op)(zva
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -16291,6 +16397,10 @@ static int zend_pre_incdec_property_helper_SPEC_UNUSED_TMP(incdec_t incdec_op, Z
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -16383,6 +16493,10 @@ static int zend_post_incdec_property_helper_SPEC_UNUSED_TMP(incdec_t incdec_op,
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -16888,7 +17002,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_TMP(int prop_dim,
zend_free_op free_op2;
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -17022,6 +17136,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_VAR(int (*binary_op)(zva
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -17272,6 +17390,10 @@ static int zend_pre_incdec_property_helper_SPEC_UNUSED_VAR(incdec_t incdec_op, Z
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -17364,6 +17486,10 @@ static int zend_post_incdec_property_helper_SPEC_UNUSED_VAR(incdec_t incdec_op,
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -17869,7 +17995,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_VAR(int prop_dim,
zend_free_op free_op2;
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -18003,6 +18129,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_UNUSED(int (*binary_op)(
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -18269,6 +18399,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_UNUSED_CV(int (*binary_op)(zval
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -18518,6 +18652,10 @@ static int zend_pre_incdec_property_helper_SPEC_UNUSED_CV(incdec_t incdec_op, ZE
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -18610,6 +18748,10 @@ static int zend_post_incdec_property_helper_SPEC_UNUSED_CV(incdec_t incdec_op, Z
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_UNUSED == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -19114,7 +19256,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_UNUSED_CV(int prop_dim,
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -19461,6 +19603,7 @@ static int zend_fetch_var_address_helper_SPEC_CV(int type, ZEND_OPCODE_HANDLER_A
if (opline->op2.u.EA.type == ZEND_FETCH_STATIC_MEMBER) {
retval = zend_std_get_static_property(EX_T(opline->op2.u.var).class_entry, Z_STRVAL_P(varname), Z_STRLEN_P(varname), 0 TSRMLS_CC);
} else {
target_symbol_table = zend_get_target_symbol_table(opline, EX(Ts), type, varname TSRMLS_CC);
/*
@@ -19874,6 +20017,10 @@ static int ZEND_SEND_REF_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
zend_error_noreturn(E_ERROR, "Only variables can be passed by reference");
}
if (EX(function_state).function->type == ZEND_INTERNAL_FUNCTION && !ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->op2.u.opline_num)) {
return zend_send_by_var_helper_SPEC_CV(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
}
SEPARATE_ZVAL_TO_MAKE_IS_REF(varptr_ptr);
varptr = *varptr_ptr;
varptr->refcount++;
@@ -20250,15 +20397,22 @@ static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
ALLOC_ZVAL(tmp);
INIT_PZVAL_COPY(tmp, array_ptr);
array_ptr = tmp;
if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (ce && ce->get_iterator) {
array_ptr->refcount--;
}
}
} else if (Z_TYPE_P(array_ptr) == IS_OBJECT) {
ce = Z_OBJCE_P(array_ptr);
if (!ce || !ce->get_iterator) {
array_ptr->refcount++;
}
} else {
if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
if (IS_CV == IS_CONST ||
((IS_CV == IS_CV || IS_CV == IS_VAR) &&
!array_ptr->is_ref &&
array_ptr->refcount > 1) {
array_ptr->refcount > 1)) {
zval *tmp;
ALLOC_ZVAL(tmp);
@@ -20271,7 +20425,7 @@ static int ZEND_FE_RESET_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
}
}
if (IS_CV != IS_TMP_VAR && ce && ce->get_iterator) {
if (ce && ce->get_iterator) {
iter = ce->get_iterator(ce, array_ptr, opline->extended_value & ZEND_FE_RESET_REFERENCE TSRMLS_CC);
if (iter && !EG(exception)) {
@@ -20711,6 +20865,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_CONST(int (*binary_op)(zval
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -20960,6 +21118,10 @@ static int zend_pre_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZEN
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -21052,6 +21214,10 @@ static int zend_post_incdec_property_helper_SPEC_CV_CONST(incdec_t incdec_op, ZE
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -21852,7 +22018,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CONST(int prop_dim, Z
zval *offset = &opline->op2.u.constant;
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -22220,6 +22386,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_TMP(int (*binary_op)(zval *r
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -22470,6 +22640,10 @@ static int zend_pre_incdec_property_helper_SPEC_CV_TMP(incdec_t incdec_op, ZEND_
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -22562,6 +22736,10 @@ static int zend_post_incdec_property_helper_SPEC_CV_TMP(incdec_t incdec_op, ZEND
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -23365,7 +23543,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_TMP(int prop_dim, ZEN
zend_free_op free_op2;
zval *offset = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -23733,6 +23911,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_VAR(int (*binary_op)(zval *r
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -23983,6 +24165,10 @@ static int zend_pre_incdec_property_helper_SPEC_CV_VAR(incdec_t incdec_op, ZEND_
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -24075,6 +24261,10 @@ static int zend_post_incdec_property_helper_SPEC_CV_VAR(incdec_t incdec_op, ZEND
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -24925,7 +25115,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_VAR(int prop_dim, ZEN
zend_free_op free_op2;
zval *offset = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
@@ -25059,6 +25249,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_UNUSED(int (*binary_op)(zval
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -25739,6 +25933,10 @@ static int zend_binary_assign_op_obj_helper_SPEC_CV_CV(int (*binary_op)(zval *re
zval **retval = &EX_T(result->u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an object");
}
EX_T(result->u.var).var.ptr_ptr = NULL;
make_real_object(object_ptr TSRMLS_CC);
object = *object_ptr;
@@ -25988,6 +26186,10 @@ static int zend_pre_incdec_property_helper_SPEC_CV_CV(incdec_t incdec_op, ZEND_O
zval **retval = &EX_T(opline->result.u.var).var.ptr;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -26080,6 +26282,10 @@ static int zend_post_incdec_property_helper_SPEC_CV_CV(incdec_t incdec_op, ZEND_
zval *retval = &EX_T(opline->result.u.var).tmp_var;
int have_get_ptr = 0;
if (IS_CV == IS_VAR && !object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot increment/decrement overloaded objects nor string offsets");
}
make_real_object(object_ptr TSRMLS_CC); /* this should modify object only if it's empty */
object = *object_ptr;
@@ -26925,7 +27131,7 @@ static int zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(int prop_dim, ZEND
zval *offset = _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC);
if (Z_TYPE_PP(container) == IS_ARRAY) {
if (Z_TYPE_PP(container) == IS_ARRAY && !prop_dim) {
HashTable *ht;
int isset = 0;
+33 -13
View File
@@ -920,7 +920,7 @@ AC_DEFUN([PHP_GEN_BUILD_DIRS],[
])
dnl
dnl PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags[, cxx[, zend_ext]]]]])
dnl PHP_NEW_EXTENSION(extname, sources [, shared [, sapi_class [, extra-cflags [, cxx [, zend_ext]]]]])
dnl
dnl Includes an extension in the build.
dnl
@@ -968,12 +968,15 @@ dnl ---------------------------------------------- Shared module
if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then
dnl ---------------------------------------------- CLI static module
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no
if test "$PHP_SAPI" = "cgi"; then
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
EXT_STATIC="$EXT_STATIC $1"
else
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
fi
case "$PHP_SAPI" in
cgi|embed[)]
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
EXT_STATIC="$EXT_STATIC $1"
;;
*[)]
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli)
;;
esac
EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
fi
PHP_ADD_BUILD_DIR($ext_builddir)
@@ -1685,7 +1688,7 @@ dnl PHP_BROKEN_GLIBC_FOPEN_APPEND
dnl
AC_DEFUN([PHP_BROKEN_GLIBC_FOPEN_APPEND], [
AC_MSG_CHECKING([for broken libc stdio])
AC_CACHE_VAL(have_broken_glibc_fopen_append,[
AC_CACHE_VAL(_cv_have_broken_glibc_fopen_append,[
AC_TRY_RUN([
#include <stdio.h>
int main(int argc, char *argv[])
@@ -1711,8 +1714,8 @@ int main(int argc, char *argv[])
return 0;
}
],
[have_broken_glibc_fopen_append=no],
[have_broken_glibc_fopen_append=yes ],
[_cv_have_broken_glibc_fopen_append=no],
[_cv_have_broken_glibc_fopen_append=yes ],
AC_TRY_COMPILE([
#include <features.h>
],[
@@ -1720,11 +1723,11 @@ AC_TRY_COMPILE([
choke me
#endif
],
[have_broken_glibc_fopen_append=yes],
[have_broken_glibc_fopen_append=no ])
[_cv_have_broken_glibc_fopen_append=yes],
[_cv_have_broken_glibc_fopen_append=no ])
)])
if test "$have_broken_glibc_fopen_append" = "yes"; then
if test "$_cv_have_broken_glibc_fopen_append" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_BROKEN_GLIBC_FOPEN_APPEND,1, [Define if your glibc borks on fopen with mode a+])
else
@@ -2766,6 +2769,23 @@ AC_DEFUN([PHP_DETECT_ICC],
)
])
dnl PHP_DETECT_SUNCC
dnl Detect if the systems default compiler is suncc.
dnl We also set some usefull CFLAGS if the user didn't set any
AC_DEFUN([PHP_DETECT_SUNCC],[
SUNCC="no"
AC_MSG_CHECKING([for suncc])
AC_EGREP_CPP([^__SUNPRO_C], [__SUNPRO_C],
SUNCC="no"
AC_MSG_RESULT([no]),
SUNCC="yes"
GCC="no"
test -n "$auto_cflags" && CFLAGS="-O -xs -xstrconst -zlazyload"
GCC=""
AC_MSG_RESULT([yes])
)
])
dnl
dnl PHP_CRYPT_R_STYLE
dnl detect the style of crypt_r() is any is available
+18 -10
View File
@@ -1,7 +1,7 @@
# +----------------------------------------------------------------------+
# | PHP Version 5 |
# +----------------------------------------------------------------------+
# | Copyright (c) 1997-2007 The PHP Group |
# | Copyright (c) 1997-2006 The PHP Group |
# +----------------------------------------------------------------------+
# | This source file is subject to version 3.01 of the PHP license, |
# | that is bundled with this package in the file LICENSE, and is |
@@ -20,9 +20,7 @@
# Makefile to generate build tools
#
ZENDDIR = Zend
SUBDIRS = $(ZENDDIR) TSRM
SUBDIRS = Zend TSRM
STAMP = buildmk.stamp
@@ -33,11 +31,10 @@ all: $(STAMP) $(ALWAYS)
@$(MAKE) -s -f build/build2.mk
generated_lists:
@echo makefile_am_files = $(ZENDDIR)/Makefile.am \
TSRM/Makefile.am > $@
@echo config_h_files = $(ZENDDIR)/acconfig.h TSRM/acconfig.h >> $@
@echo config_m4_files = $(ZENDDIR)/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 \
$(ZENDDIR)/acinclude.m4 ext/*/config*.m4 sapi/*/config.m4 >> $@
@echo makefile_am_files = Zend/Makefile.am TSRM/Makefile.am > $@
@echo config_h_files = Zend/acconfig.h TSRM/acconfig.h >> $@
@echo config_m4_files = Zend/Zend.m4 TSRM/tsrm.m4 TSRM/threads.m4 \
Zend/acinclude.m4 ext/*/config*.m4 sapi/*/config.m4 >> $@
$(STAMP): build/buildcheck.sh
@build/buildcheck.sh $(STAMP)
@@ -67,7 +64,18 @@ snapshot:
cvsclean-work:
@for i in `find . -name .cvsignore`; do \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice | sed 's/[\r\n]/ /g'` *.o *.a .libs || true); \
(cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice | sed 's/[[:space:]]/ /g'` *.o *.a *.lo *.la *.gcno *.gcda .libs || true); \
done
svnclean-work:
@for i in `find . -type d -not -path '*/.svn/*' | grep -v '.svn'`; do \
(cd $$i 2>/dev/null && rm -rf `svn propget svn:ignore . | grep -v config.nice` *.o *.a *.lo *.la *.gcno *.gcda .libs || true); \
done
gitclean-work:
@if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \
(echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \
fi; \
git clean -X -f -d;
.PHONY: $(ALWAYS) snapshot
+2 -2
View File
@@ -48,9 +48,9 @@ fi
if test "$1" = "2" && test "$2" -ge "50"; then
echo "buildconf: Your version of autoconf likely contains buggy cache code."
echo " Running cvsclean for you."
echo " Running vcsclean for you."
echo " To avoid this, install autoconf-2.13."
./cvsclean
./vcsclean
stamp=
fi
+899 -793
View File
File diff suppressed because it is too large. Load diff
+1 -4
View File
@@ -51,8 +51,6 @@ function do_deps(mod_idx, module_name, mod_name_len, dep, ext, val, depid
do_deps(depidx);
}
}
#printf(" phpext_%s_ptr,\n", module_name);
printf(" phpext_%s_ptr,@NEWLINE@", module_name);
delete mods[mod_idx];
}
@@ -79,8 +77,7 @@ END {
out_count = 0;
while (count(mods)) {
# count down, since we need to assemble it in reverse order
for (i = mod_count-1; i >= 0; --i) {
for (i = 0; i <= mod_count - 1; i++) {
if (i in mods) {
do_deps(i);
}
+2 -29
View File
@@ -32,38 +32,11 @@ if test "$dev" = "0" -a "$devok" = "0"; then
echo "use buildconf --force to override this check."
exit 1
fi
if test -z "$ZENDDIR"; then
if grep "PHP_MAJOR_VERSION 5" main/php_version.h >/dev/null; then
v=5
else
v=4
fi
if test "$v" = "5"; then
if test -r "Zend/OBJECTS2_HOWTO"; then
:
else
mv Zend ZendEngine1 2>/dev/null
mv ZendEngine2 Zend
fi
else
if test -r "Zend/zend_execute_globals.h"; then
:
else
mv Zend ZendEngine2 2>/dev/null
mv ZendEngine1 Zend
fi
fi
ZENDDIR=Zend
echo "using default Zend directory"
fi
rm -f generated_lists
if test "$debug" = "yes"; then
${MAKE:-make} -s -f build/build.mk ZENDDIR="$ZENDDIR" SUPPRESS_WARNINGS=""
${MAKE:-make} -s -f build/build.mk SUPPRESS_WARNINGS=""
else
${MAKE:-make} -s -f build/build.mk ZENDDIR="$ZENDDIR"
${MAKE:-make} -s -f build/build.mk
fi
+80 -20
View File
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2005-08-03'
timestamp='2008-01-23'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -55,8 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -106,7 +107,7 @@ set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -160,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -206,8 +208,11 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
exit ;;
*:SolidBSD:*:*)
echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
exit ;;
macppc:MirBSD:*:*)
echo powerppc-unknown-mirbsd${UNAME_RELEASE}
echo powerpc-unknown-mirbsd${UNAME_RELEASE}
exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
@@ -325,7 +330,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
i86pc:SunOS:5.*:*)
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
sun4*:SunOS:6*:*)
@@ -527,7 +532,7 @@ EOF
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[45])
*:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -764,12 +769,19 @@ EOF
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
case ${UNAME_MACHINE} in
pc98)
echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
i*:MINGW*:*)
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
i*:windows32*:*)
@@ -779,9 +791,18 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
x86:Interix*:[34]*)
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit ;;
*:Interix*:[3456]*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
EM64T | authenticamd)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
echo ia64-unknown-interix${UNAME_RELEASE}
exit ;;
esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
@@ -815,6 +836,16 @@ EOF
echo ${UNAME_MACHINE}-pc-minix
exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
echo ${UNAME_MACHINE}-unknown-linux-gnueabi
fi
exit ;;
avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
cris:Linux:*:*)
@@ -851,7 +882,11 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
@@ -870,7 +905,11 @@ EOF
#endif
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^CPU/{
s: ::g
p
}'`"
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
or32:Linux:*:*)
@@ -919,9 +958,15 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
@@ -964,7 +1009,7 @@ EOF
LIBC=gnulibc1
# endif
#else
#ifdef __INTEL_COMPILER
#if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -974,7 +1019,11 @@ EOF
LIBC=dietlibc
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
/^LIBC/{
s: ::g
p
}'`"
test x"${LIBC}" != x && {
echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
exit
@@ -1176,6 +1225,15 @@ EOF
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux${UNAME_RELEASE}
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux${UNAME_RELEASE}
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux${UNAME_RELEASE}
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
exit ;;
@@ -1185,7 +1243,6 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
*86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
@@ -1264,6 +1321,9 @@ EOF
i*86:skyos:*:*)
echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
exit ;;
i*86:rdos:*:*)
echo ${UNAME_MACHINE}-pc-rdos
exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1424,9 +1484,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
Vendored
+116 -37
View File
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
# Free Software Foundation, Inc.
timestamp='2005-07-08'
timestamp='2008-01-16'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -71,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -119,8 +120,9 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -171,6 +173,10 @@ case $os in
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -187,6 +193,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -231,15 +241,16 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -257,28 +268,27 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ms1 \
| mt \
| msp430 \
| nios | nios2 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| score \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
m32c)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
@@ -286,6 +296,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
ms1)
basic_machine=mt-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -305,18 +318,18 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| avr-* | avr32-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -336,30 +349,33 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| ms1-* \
| mt-* \
| msp430-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-*)
;;
m32c-*)
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -431,6 +447,14 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
c90)
basic_machine=c90-cray
os=-unicos
@@ -463,8 +487,8 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
cr16)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
@@ -656,6 +680,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -671,6 +703,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -696,6 +732,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -794,6 +833,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
@@ -803,6 +850,12 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
@@ -859,6 +912,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
rdos)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -885,6 +942,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -896,6 +957,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
sh5el)
basic_machine=sh5le-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
@@ -985,6 +1049,10 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
tile*)
basic_machine=tile-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -1101,7 +1169,7 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1174,21 +1242,23 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
| -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*)
| -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1340,6 +1410,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
@@ -1349,9 +1425,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1377,6 +1453,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
+57 -38
View File
@@ -31,7 +31,7 @@ dnl Basic autoconf + automake initialization, generation of config.nice.
dnl -------------------------------------------------------------------------
AC_PREREQ(2.13)
AC_INIT(README.CVS-RULES)
AC_INIT(README.SVN-RULES)
PHP_CONFIG_NICE(config.nice)
@@ -41,8 +41,8 @@ AC_CONFIG_HEADER(main/php_config.h)
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=9
PHP_EXTRA_VERSION="RC3"
PHP_RELEASE_VERSION=12
PHP_EXTRA_VERSION=""
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`
@@ -122,26 +122,12 @@ dnl or the contents of libs.
$php_shtool mkdir -p libs
rm -f libs/*
dnl Darwin 9 hack
dnl Because the default debugging format used by Apple's GCC on Mac OS 10.5
dnl causes errors in all current and past versions of Autoconf, we do a little
dnl messing with the CFLAGS here to trick it.
php_did_darwin9_cheat=0
case $host_alias in
*darwin9*)
hasg=`echo $CFLAGS | grep -E '(^-g)|([[:space:]]-g)'`
if test x"$hasg" = "x"; then
php_did_darwin9_cheat=1
CFLAGS="$CFLAGS -gstabs"
fi
;;
esac
dnl Checks for programs.
dnl -------------------------------------------------------------------------
AC_PROG_CC
AC_PROG_CC([cc gcc])
PHP_DETECT_ICC
PHP_DETECT_SUNCC
AC_PROG_CC_C_O
dnl Change to AC_PROG_CC_STDC when we start requiring a post-2.13 autoconf
dnl AC_PROG_CC_STDC
@@ -170,7 +156,7 @@ dnl Check if bison generated files exist when bison does not..
case $php_cv_bison_version in
""|invalid[)]
if ! test -f "$abs_srcdir/Zend/zend_language_parser.h" || ! test -f "$abs_srcdir/Zend/zend_language_parser.c" ; then
AC_MSG_ERROR([bison is required to build PHP/Zend when building a CVS checkout!])
AC_MSG_ERROR([bison is required to build PHP/Zend when building a SVN checkout!])
fi
;;
esac
@@ -187,6 +173,11 @@ case $host_cpu in
CFLAGS="$CFLAGS -ieee"
fi
;;
sparc*)
if test "$SUNCC" = "yes"; then
CFLAGS="$CFLAGS -xmemalign=8s"
fi
;;
esac
case $host_alias in
@@ -206,7 +197,14 @@ case $host_alias in
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
fi
fi
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
macosx_major=`sw_vers -productVersion | cut -d . -f 1`
macosx_minor=`sw_vers -productVersion | cut -d . -f 2`
if test "$macosx_major" -ge "10" && test "$macosx_minor" -lt "6" ; then
AC_DEFINE(BIND_8_COMPAT, 1, [Enabling BIND8 compatibility for Panther])
fi
php_multiple_shlib_versions_ok=yes
;;
*beos*)
@@ -361,7 +359,6 @@ dnl in -lc, -lbind and -lresolv
PHP_CHECK_FUNC(inet_aton, resolv, bind)
PHP_CHECK_FUNC(dn_skipname, resolv, bind)
dnl Then headers.
dnl -------------------------------------------------------------------------
@@ -381,6 +378,7 @@ sys/time.h \
netinet/in.h \
alloca.h \
arpa/inet.h \
arpa/nameser_compat.h \
arpa/nameser.h \
assert.h \
crypt.h \
@@ -589,11 +587,13 @@ tzset \
unlockpt \
unsetenv \
usleep \
nanosleep \
utime \
vsnprintf \
)
dnl Some systems (like OpenSolaris) do not have nanosleep in libc
AC_CACHE_CHECK([for nanosleep], ac_cv_func_nanosleep, [PHP_CHECK_FUNC_LIB(nanosleep, rt)])
dnl Check for getaddrinfo, should be a better way, but...
dnl Also check for working getaddrinfo
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,
@@ -685,7 +685,7 @@ if test "$PHP_GCOV" = "yes"; then
AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
fi
ltp_version_list="1.5 1.6"
ltp_version_list="1.5 1.6 1.7"
AC_CHECK_PROG(LTP, lcov, lcov)
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
@@ -745,8 +745,17 @@ if test "$PHP_DEBUG" = "yes"; then
changequote([,])
dnl add -O0 only if GCC or ICC is used
if test "$GCC" = "yes" || test "$ICC" = "yes"; then
CFLAGS="$CFLAGS -O0"
CXXFLAGS="$CXXFLAGS -O0"
CFLAGS="$CFLAGS -g -O0"
CXXFLAGS="$CXXFLAGS -g -O0"
fi
if test "$SUNCC" = "yes"; then
if test -n "$auto_cflags"; then
CFLAGS="-g"
CXXFLAGS="-g"
else
CFLAGS="$CFLAGS -g"
CXXFLAGS="$CFLAGS -g"
fi
fi
else
PHP_DEBUG=0
@@ -951,6 +960,7 @@ case $php_build_target in
esac
EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
dnl this has to be here to prevent the openssl crypt() from
dnl overriding the system provided crypt().
@@ -1131,6 +1141,7 @@ EXPANDED_PEAR_INSTALLDIR=`eval echo $PEAR_INSTALLDIR`
EXPANDED_EXTENSION_DIR=`eval echo $EXTENSION_DIR`
EXPANDED_LOCALSTATEDIR=`eval echo $localstatedir`
EXPANDED_BINDIR=`eval echo $bindir`
EXPANDED_SBINDIR=`eval echo $sbindir`
EXPANDED_LIBDIR=$libdir
EXPANDED_SYSCONFDIR=`eval echo $sysconfdir`
EXPANDED_DATADIR=$datadir
@@ -1146,6 +1157,7 @@ AC_SUBST(INCLUDE_PATH)
AC_SUBST(EXPANDED_PEAR_INSTALLDIR)
AC_SUBST(EXPANDED_EXTENSION_DIR)
AC_SUBST(EXPANDED_BINDIR)
AC_SUBST(EXPANDED_SBINDIR)
AC_SUBST(EXPANDED_LIBDIR)
AC_SUBST(EXPANDED_DATADIR)
AC_SUBST(EXPANDED_SYSCONFDIR)
@@ -1190,12 +1202,14 @@ if test "$PHP_CLI" != "no"; then
PHP_INSTALL_CLI_TARGET="install-cli"
PHP_ADD_SOURCES(sapi/cli, php_cli.c php_cli_readline.c getopt.c,, cli)
PHP_INSTALLED_SAPIS="cli $PHP_SAPI"
PHP_EXECUTABLE="\$(top_builddir)/\$(SAPI_CLI_PATH)"
else
PHP_INSTALLED_SAPIS="$PHP_SAPI"
fi
PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)
PHP_SUBST(PHP_EXECUTABLE)
PHP_SUBST(PHP_CLI_TARGET)
PHP_SUBST(PHP_SAPI_OBJS)
PHP_SUBST(PHP_CLI_OBJS)
@@ -1212,6 +1226,7 @@ PHP_SUBST_OLD(php_abs_top_builddir)
PHP_SUBST_OLD(php_abs_top_srcdir)
PHP_SUBST(bindir)
PHP_SUBST(sbindir)
PHP_SUBST(exec_prefix)
PHP_SUBST_OLD(program_prefix)
PHP_SUBST_OLD(program_suffix)
@@ -1304,6 +1319,14 @@ PHP_CONFIGURE_PART(Configuring libtool)
LDFLAGS="$LDFLAGS $PHP_AIX_LDFLAGS"
dnl Autoconf 2.13's libtool checks go slightly nuts on Mac OS X 10.5 and 10.6.
dnl This hack works around it. Ugly.
case $host_alias in
*darwin9*|*darwin10*)
ac_cv_exeext=
;;
esac
dnl Only allow AC_PROG_CXX and AC_PROG_CXXCPP if they are explicitly called (by PHP_REQUIRE_CXX).
dnl Otherwise AC_PROG_LIBTOOL fails if there is no working C++ compiler.
AC_PROVIDE_IFELSE([PHP_REQUIRE_CXX], [], [
@@ -1327,15 +1350,6 @@ SHARED_LIBTOOL='$(LIBTOOL)'
CC=$old_CC
dnl Finish the Darwin hack
if test "$php_did_darwin9_cheat" -eq 1; then
if test "$PHP_DEBUG" = "1"; then
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-gstabs/-g/g'`
else
CFLAGS=`echo "-O2 $CFLAGS" | $SED -e 's/-gstabs//g'`
fi
fi
PHP_CONFIGURE_PART(Generating files)
CXXFLAGS_CLEAN=$CXXFLAGS
@@ -1542,13 +1556,18 @@ X
fi
if test "$PHP_SIGCHILD" != "yes"; then
if test "$PHP_OCI8_INSTANT_CLIENT" = "no"; then
cat <<X
+--------------------------------------------------------------------+
| Notice: |
| If you encounter <defunc> processes when using a local Oracle-DB |
| please recompile PHP and specify --enable-sigchild when configuring|
| (This problem has been reported under Linux using Oracle >= 8.1.5) |
| If you encounter <defunc> processes when using a local Oracle |
| database, set the value BEQUEATH_DETACH=YES in Oracle Net's |
| sqlnet.ora file on the PHP host, or set the environment variable |
| BEQUEATH_DETACH to YES before starting Apache. If the problem |
| still occurs, then recompile PHP and specify --enable-sigchild |
| when configuring. |
X
fi
fi
fi
-3
View File
@@ -1,3 +0,0 @@
#! /bin/sh
${MAKE:-make} -f build/build.mk cvsclean-work
+3 -11
View File
@@ -21,8 +21,6 @@
#ifndef PHP_BCMATH_H
#define PHP_BCMATH_H
#if HAVE_BCMATH
#include "libbcmath/src/bcmath.h"
extern zend_module_entry bcmath_module_entry;
@@ -50,18 +48,12 @@ ZEND_BEGIN_MODULE_GLOBALS(bcmath)
long bc_precision;
ZEND_END_MODULE_GLOBALS(bcmath)
#if ZTS
#define BCG(v) TSRMG(bcmath_globals_id, zend_bcmath_globals *, v)
#ifdef ZTS
# define BCG(v) TSRMG(bcmath_globals_id, zend_bcmath_globals *, v)
#else
#define BCG(v) (bcmath_globals.v)
# define BCG(v) (bcmath_globals.v)
#endif
ZEND_EXTERN_MODULE_GLOBALS(bcmath)
#else
#define phpext_bcmath_ptr NULL
#endif
#endif /* PHP_BCMATH_H */
+14
View File
@@ -0,0 +1,14 @@
--TEST--
bcdiv — Divide two arbitrary precision numbers
--CREDITS--
TestFest2009
Antoni Torrents
antoni@solucionsinternet.com
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--FILE--
<?php
echo bcdiv('10.99', '0');
?>
--EXPECTF--
Warning: bcdiv(): Division by zero in %s.php on line %d
+13
View File
@@ -0,0 +1,13 @@
--TEST--
bcdiv — Divide two arbitrary precision numbers
--CREDITS--
Antoni Torrents
antoni@solucionsinternet.com
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--FILE--
<?php
echo bcdiv('1', '2', '3', '4');
?>
--EXPECTF--
Warning: Wrong parameter count for bcdiv() in %s.php on line %d
+13
View File
@@ -0,0 +1,13 @@
--TEST--
bcmod — Get modulus of an arbitrary precision number
--CREDITS--
Antoni Torrents
antoni@solucionsinternet.com
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--FILE--
<?php
echo bcmod('1', '2', '3');
?>
--EXPECTF--
Warning: Wrong parameter count for bcmod() in %s.php on line %d
+13
View File
@@ -0,0 +1,13 @@
--TEST--
bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus
--CREDITS--
Antoni Torrents
antoni@solucionsinternet.com
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--FILE--
<?php
echo bcpowmod('1');
?>
--EXPECTF--
Warning: bcpowmod() expects at least 3 parameters, 1 given in %s.php on line %d
+13
View File
@@ -0,0 +1,13 @@
--TEST--
bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus
--CREDITS--
Antoni Torrents
antoni@solucionsinternet.com
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--FILE--
<?php
echo bcpowmod('1', '2');
?>
--EXPECTF--
Warning: bcpowmod() expects at least 3 parameters, 2 given in %s.php on line %d
+13
View File
@@ -0,0 +1,13 @@
--TEST--
bcpowmod — Raise an arbitrary precision number to another, reduced by a specified modulus
--CREDITS--
Antoni Torrents
antoni@solucionsinternet.com
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--FILE--
<?php
echo bcpowmod('1', '2', '3', '4', '5');
?>
--EXPECTF--
Warning: bcpowmod() expects at most 4 parameters, 5 given in %s.php on line %d
+13
View File
@@ -0,0 +1,13 @@
--TEST--
bcsqrt — Get the square root of an arbitrary precision number
--CREDITS--
Antoni Torrents
antoni@solucionsinternet.com
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--FILE--
<?php
echo bcsqrt('-9');
?>
--EXPECTF--
Warning: bcsqrt(): Square root of negative number in %s.php on line %d
+1 -1
View File
@@ -309,7 +309,7 @@ ITypeInfo *php_com_locate_typeinfo(char *typelibname, php_com_dotnet_object *obj
}
} else if (typelibname) {
/* Fetch the typelibrary and use that to look things up */
typelib = php_com_load_typelib(typelibname, obj->code_page TSRMLS_CC);
typelib = php_com_load_typelib(typelibname, CP_THREAD_ACP TSRMLS_CC);
}
if (!gotguid && dispname && typelib) {
+19
View File
@@ -0,0 +1,19 @@
--TEST--
Bug #45280 (Reflection of instantiated COM classes causes PHP to crash)
--SKIPIF--
<?php
if (!extension_loaded("reflection")){ echo "skip, no reflection support present"; }
if (!extension_loaded("com_dotnet")){ echo "skip COM/.Net support not present"; }
?>
--FILE--
<?php
$dict = new COM("Scripting.Dictionary");
ob_start();
ReflectionObject::export($dict);
ob_get_clean();
echo 'done';
?>
--EXPECT--
done
+70 -65
View File
@@ -7,7 +7,7 @@ PHP_ARG_WITH(curl, for cURL support,
dnl Temporary option while we develop this aspect of the extension
PHP_ARG_WITH(curlwrappers, if we should use cURL for url streams,
[ --with-curlwrappers Use cURL for url streams], no, no)
[ --with-curlwrappers EXPERIMENTAL: Use cURL for url streams], no, no)
if test "$PHP_CURL" != "no"; then
if test -r $PHP_CURL/include/curl/easy.h; then
@@ -48,74 +48,79 @@ if test "$PHP_CURL" != "no"; then
else
AC_MSG_ERROR(cURL version 7.10.5 or later is required to compile php with cURL support)
fi
AC_MSG_CHECKING([for SSL support in libcurl])
CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
if test "$CURL_SSL" = "SSL"; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support])
save_CFLAGS="$CFLAGS"
CFLAGS="`$CURL_CONFIG --cflags`"
save_LDFLAGS="$LDFLAGS"
LDFLAGS="`$CURL_CONFIG --libs` $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR"
AC_PROG_CPP
AC_MSG_CHECKING([for openssl support in libcurl])
AC_TRY_RUN([
#include <curl/curl.h>
int main(int argc, char *argv[]) {
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
if (data && data->ssl_version && *data->ssl_version) {
const char *ptr = data->ssl_version;
while(*ptr == ' ') ++ptr;
return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
}
return 1;
}
],[
AC_MSG_RESULT([yes])
AC_CHECK_HEADERS([openssl/crypto.h], [
AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
])
], [
AC_MSG_RESULT([no])
], [
AC_MSG_RESULT([no])
])
AC_MSG_CHECKING([for gnutls support in libcurl])
AC_TRY_RUN([
#include <curl/curl.h>
int main(int argc, char *argv[]) {
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
if (data && data->ssl_version && *data->ssl_version) {
const char *ptr = data->ssl_version;
while(*ptr == ' ') ++ptr;
return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
}
return 1;
}
], [
AC_MSG_RESULT([yes])
AC_CHECK_HEADER([gcrypt.h], [
AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
])
], [
AC_MSG_RESULT([no])
], [
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
LDFLAGS="$save_LDFLAGS"
else
AC_MSG_RESULT([no])
fi
PHP_ADD_INCLUDE($CURL_DIR/include)
PHP_EVAL_LIBLINE($CURL_LIBS, CURL_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(curl, $CURL_DIR/$PHP_LIBDIR, CURL_SHARED_LIBADD)
AC_MSG_CHECKING([for SSL support in libcurl])
CURL_SSL=`$CURL_CONFIG --feature | $EGREP SSL`
if test "$CURL_SSL" = "SSL"; then
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_CURL_SSL], [1], [Have cURL with SSL support])
save_CFLAGS="$CFLAGS"
CFLAGS="`$CURL_CONFIG --cflags`"
AC_PROG_CPP
AC_MSG_CHECKING([for openssl support in libcurl])
AC_TRY_RUN([
#include <curl/curl.h>
int main(int argc, char *argv[])
{
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
if (data && data->ssl_version && *data->ssl_version) {
const char *ptr = data->ssl_version;
while(*ptr == ' ') ++ptr;
return strncasecmp(ptr, "OpenSSL", sizeof("OpenSSL")-1);
}
return 1;
}
],[
AC_MSG_RESULT([yes])
AC_CHECK_HEADERS([openssl/crypto.h], [
AC_DEFINE([HAVE_CURL_OPENSSL], [1], [Have cURL with OpenSSL support])
])
], [
AC_MSG_RESULT([no])
], [
AC_MSG_RESULT([no])
])
AC_MSG_CHECKING([for gnutls support in libcurl])
AC_TRY_RUN([
#include <curl/curl.h>
int main(int argc, char *argv[])
{
curl_version_info_data *data = curl_version_info(CURLVERSION_NOW);
if (data && data->ssl_version && *data->ssl_version) {
const char *ptr = data->ssl_version;
while(*ptr == ' ') ++ptr;
return strncasecmp(ptr, "GnuTLS", sizeof("GnuTLS")-1);
}
return 1;
}
], [
AC_MSG_RESULT([yes])
AC_CHECK_HEADER([gcrypt.h], [
AC_DEFINE([HAVE_CURL_GNUTLS], [1], [Have cURL with GnuTLS support])
])
], [
AC_MSG_RESULT([no])
], [
AC_MSG_RESULT([no])
])
CFLAGS="$save_CFLAGS"
else
AC_MSG_RESULT([no])
fi
PHP_CHECK_LIBRARY(curl,curl_easy_perform,
[
+336 -188
View File
@@ -147,6 +147,7 @@ static struct gcry_thread_cbs php_curl_gnutls_tsl = {
#endif
/* }}} */
static void _php_curl_close_ex(php_curl *ch TSRMLS_DC);
static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
@@ -157,36 +158,51 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
#define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v);
#if defined(PHP_WIN32) || defined(__GNUC__)
#define php_curl_ret(__ret) RETVAL_FALSE; return __ret;
# define php_curl_ret(__ret) RETVAL_FALSE; return __ret;
#else
#define php_curl_ret(__ret) RETVAL_FALSE; return;
# define php_curl_ret(__ret) RETVAL_FALSE; return;
#endif
#define PHP_CURL_CHECK_OPEN_BASEDIR(str, len, __ret) \
if (((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && \
strncasecmp(str, "file:", sizeof("file:") - 1) == 0) \
{ \
php_url *tmp_url; \
\
if (!(tmp_url = php_url_parse_ex(str, len))) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid URL '%s'", str); \
php_curl_ret(__ret); \
} \
\
if (tmp_url->host || !php_memnstr(str, tmp_url->path, strlen(tmp_url->path), str + len)) { \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "URL '%s' contains unencoded control characters", str); \
php_url_free(tmp_url); \
php_curl_ret(__ret); \
} \
\
if (tmp_url->query || tmp_url->fragment || php_check_open_basedir(tmp_url->path TSRMLS_CC) || \
(PG(safe_mode) && !php_checkuid(tmp_url->path, "rb+", CHECKUID_CHECK_MODE_PARAM)) \
) { \
php_url_free(tmp_url); \
php_curl_ret(__ret); \
} \
php_url_free(tmp_url); \
static int php_curl_option_url(php_curl *ch, const char *url, const int len) /* {{{ */
{
CURLcode error = CURLE_OK;
#if LIBCURL_VERSION_NUM < 0x071100
char *copystr = NULL;
#endif
TSRMLS_FETCH();
/* Disable file:// if open_basedir or safe_mode are used */
if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {
#if LIBCURL_VERSION_NUM >= 0x071304
error = curl_easy_setopt(ch->cp, CURLOPT_PROTOCOLS, CURLPROTO_ALL & ~CURLPROTO_FILE);
#else
php_url *uri;
if (!(uri = php_url_parse_ex(url, len))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid URL '%s'", url);
return 0;
}
if (uri->scheme && !strncasecmp("file", uri->scheme, sizeof("file"))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol 'file' disabled in cURL");
php_url_free(uri);
return 0;
}
php_url_free(uri);
#endif
}
/* Strings passed to libcurl as 'char *' arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
#if LIBCURL_VERSION_NUM >= 0x071100
error = curl_easy_setopt(ch->cp, CURLOPT_URL, url);
#else
copystr = estrndup(url, len);
error = curl_easy_setopt(ch->cp, CURLOPT_URL, copystr);
zend_llist_add_element(&ch->to_free.str, &copystr);
#endif
return (error == CURLE_OK ? 1 : 0);
}
/* }}} */
/* {{{ arginfo */
static
@@ -279,14 +295,13 @@ ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_info_read, 0, 0, 1)
ZEND_ARG_INFO(0, mh)
ZEND_ARG_INFO(0, msgs_in_queue)
ZEND_ARG_INFO(1, msgs_in_queue)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0)
ZEND_ARG_INFO(0, mh)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ curl_functions[]
@@ -352,8 +367,12 @@ PHP_MINFO_FUNCTION(curl)
PHP_MINIT_FUNCTION(curl)
{
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl", module_number);
le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number);
/* See http://curl.haxx.se/lxr/source/docs/libcurl/symbols-in-versions
or curl src/docs/libcurl/symbols-in-versions for a (almost) complete list
of options and which version they were introduced */
/* Constants for curl_setopt() */
REGISTER_CURL_CONSTANT(CURLOPT_DNS_USE_GLOBAL_CACHE);
REGISTER_CURL_CONSTANT(CURLOPT_DNS_CACHE_TIMEOUT);
@@ -421,7 +440,7 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLOPT_FILETIME);
REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION);
REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION);
#if CURLOPT_PASSWDFUNCTION != 0
#if CURLOPT_PASSWDFUNCTION != 0
REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION);
#endif
REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION);
@@ -467,14 +486,14 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURL_TIMECOND_LASTMOD);
#if LIBCURL_VERSION_NUM > 0x070a05 /* CURLOPT_HTTPAUTH is available since curl 7.10.6 */
REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
/* http authentication options */
REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
REGISTER_CURL_CONSTANT(CURLOPT_HTTPAUTH);
/* http authentication options */
REGISTER_CURL_CONSTANT(CURLAUTH_BASIC);
REGISTER_CURL_CONSTANT(CURLAUTH_DIGEST);
REGISTER_CURL_CONSTANT(CURLAUTH_GSSNEGOTIATE);
REGISTER_CURL_CONSTANT(CURLAUTH_NTLM);
REGISTER_CURL_CONSTANT(CURLAUTH_ANY);
REGISTER_CURL_CONSTANT(CURLAUTH_ANYSAFE);
#endif
#if LIBCURL_VERSION_NUM > 0x070a06 /* CURLOPT_PROXYAUTH & CURLOPT_FTP_CREATE_MISSING_DIRS are available since curl 7.10.7 */
@@ -520,7 +539,7 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURL_VERSION_KERBEROS4);
REGISTER_CURL_CONSTANT(CURL_VERSION_SSL);
REGISTER_CURL_CONSTANT(CURL_VERSION_LIBZ);
/* version constants */
REGISTER_CURL_CONSTANT(CURLVERSION_NOW);
@@ -594,8 +613,8 @@ PHP_MINIT_FUNCTION(curl)
#if LIBCURL_VERSION_NUM >= 0x070b00
REGISTER_CURL_CONSTANT(CURLE_FTP_SSL_FAILED);
#endif
REGISTER_CURL_CONSTANT(CURLPROXY_HTTP);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS4);
REGISTER_CURL_CONSTANT(CURLPROXY_SOCKS5);
REGISTER_CURL_CONSTANT(CURL_NETRC_OPTIONAL);
@@ -605,7 +624,7 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_NONE);
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_0);
REGISTER_CURL_CONSTANT(CURL_HTTP_VERSION_1_1);
REGISTER_CURL_CONSTANT(CURLM_CALL_MULTI_PERFORM);
REGISTER_CURL_CONSTANT(CURLM_OK);
REGISTER_CURL_CONSTANT(CURLM_BAD_HANDLE);
@@ -630,16 +649,34 @@ PHP_MINIT_FUNCTION(curl)
REGISTER_CURL_CONSTANT(CURLFTPSSL_ALL);
#endif
#if LIBCURL_VERSION_NUM >= 0x071304
REGISTER_CURL_CONSTANT(CURLOPT_REDIR_PROTOCOLS);
REGISTER_CURL_CONSTANT(CURLOPT_PROTOCOLS);
REGISTER_CURL_CONSTANT(CURLPROTO_HTTP);
REGISTER_CURL_CONSTANT(CURLPROTO_HTTPS);
REGISTER_CURL_CONSTANT(CURLPROTO_FTP);
REGISTER_CURL_CONSTANT(CURLPROTO_FTPS);
REGISTER_CURL_CONSTANT(CURLPROTO_SCP);
REGISTER_CURL_CONSTANT(CURLPROTO_SFTP);
REGISTER_CURL_CONSTANT(CURLPROTO_TELNET);
REGISTER_CURL_CONSTANT(CURLPROTO_LDAP);
REGISTER_CURL_CONSTANT(CURLPROTO_LDAPS);
REGISTER_CURL_CONSTANT(CURLPROTO_DICT);
REGISTER_CURL_CONSTANT(CURLPROTO_FILE);
REGISTER_CURL_CONSTANT(CURLPROTO_TFTP);
REGISTER_CURL_CONSTANT(CURLPROTO_ALL);
#endif
#ifdef PHP_CURL_NEED_OPENSSL_TSL
if (!CRYPTO_get_id_callback()) {
int i, c = CRYPTO_num_locks();
php_curl_openssl_tsl = malloc(c * sizeof(MUTEX_T));
for (i = 0; i < c; ++i) {
php_curl_openssl_tsl[i] = tsrm_mutex_alloc();
}
CRYPTO_set_id_callback(php_curl_ssl_id);
CRYPTO_set_locking_callback(php_curl_ssl_lock);
}
@@ -647,7 +684,7 @@ PHP_MINIT_FUNCTION(curl)
#ifdef PHP_CURL_NEED_GNUTLS_TSL
gcry_control(GCRYCTL_SET_THREAD_CBS, &php_curl_gnutls_tsl);
#endif
if (curl_global_init(CURL_GLOBAL_SSL) != CURLE_OK) {
return FAILURE;
}
@@ -659,17 +696,28 @@ PHP_MINIT_FUNCTION(curl)
char **p = (char **)info->protocols;
while (*p != NULL) {
php_register_url_stream_wrapper(*p++, &php_curl_wrapper TSRMLS_CC);
/* Do not enable cURL "file" protocol and make sure cURL is always used when --with-curlwrappers is enabled */
if (strncasecmp(*p, "file", sizeof("file")-1) != 0) {
php_unregister_url_stream_wrapper(*p TSRMLS_CC);
php_register_url_stream_wrapper(*p, &php_curl_wrapper TSRMLS_CC);
}
(void) *p++;
}
}
# else
php_unregister_url_stream_wrapper("http");
php_register_url_stream_wrapper("http", &php_curl_wrapper TSRMLS_CC);
php_unregister_url_stream_wrapper("https");
php_register_url_stream_wrapper("https", &php_curl_wrapper TSRMLS_CC);
php_unregister_url_stream_wrapper("ftp");
php_register_url_stream_wrapper("ftp", &php_curl_wrapper TSRMLS_CC);
php_unregister_url_stream_wrapper("ftps");
php_register_url_stream_wrapper("ftps", &php_curl_wrapper TSRMLS_CC);
php_unregister_url_stream_wrapper("ldap");
php_register_url_stream_wrapper("ldap", &php_curl_wrapper TSRMLS_CC);
# endif
#endif
return SUCCESS;
}
/* }}} */
@@ -688,14 +736,14 @@ PHP_MSHUTDOWN_FUNCTION(curl)
#ifdef PHP_CURL_NEED_OPENSSL_TSL
if (php_curl_openssl_tsl) {
int i, c = CRYPTO_num_locks();
CRYPTO_set_id_callback(NULL);
CRYPTO_set_locking_callback(NULL);
for (i = 0; i < c; ++i) {
tsrm_mutex_free(php_curl_openssl_tsl[i]);
}
free(php_curl_openssl_tsl);
php_curl_openssl_tsl = NULL;
}
@@ -717,7 +765,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
fprintf(stderr, "curl_write() called\n");
fprintf(stderr, "data = %s, size = %d, nmemb = %d, ctx = %x\n", data, size, nmemb, ctx);
#endif
switch (t->method) {
case PHP_CURL_STDOUT:
PHPWRITE(data, length);
@@ -741,7 +789,7 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
ZVAL_RESOURCE(handle, ch->id);
zend_list_addref(ch->id);
argv[0] = &handle;
MAKE_STD_ZVAL(zdata);
ZVAL_STRINGL(zdata, data, length, 1);
argv[1] = &zdata;
@@ -832,7 +880,7 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
error = zend_call_function(&fci, &t->fci_cache TSRMLS_CC);
ch->in_callback = 0;
if (error == FAILURE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot call the CURLOPT_READFUNCTION");
#if LIBCURL_VERSION_NUM >= 0x070c01 /* 7.12.1 */
length = CURL_READFUNC_ABORT;
#endif
@@ -863,7 +911,7 @@ static size_t curl_write_header(char *data, size_t size, size_t nmemb, void *ctx
php_curl_write *t = ch->handlers->write_header;
size_t length = size * nmemb;
TSRMLS_FETCH_FROM_CTX(ch->thread_ctx);
switch (t->method) {
case PHP_CURL_STDOUT:
/* Handle special case write when we're returning the entire transfer
@@ -939,7 +987,7 @@ static int curl_debug(CURL *cp, curl_infotype type, char *buf, size_t buf_len, v
if (type == CURLINFO_HEADER_OUT) {
if (ch->header.str_len) {
efree(ch->header.str);
efree(ch->header.str);
}
if (buf_len > 0) {
ch->header.str = estrndup(buf, buf_len);
@@ -985,7 +1033,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "User handler '%s' did not return a string", Z_STRVAL_P(func));
}
zval_ptr_dtor(&argv[0]);
zval_ptr_dtor(&argv[1]);
zval_ptr_dtor(&argv[2]);
@@ -1002,7 +1050,7 @@ static size_t curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
static void curl_free_string(void **string)
{
efree(*string);
}
}
/* }}} */
#endif
@@ -1027,7 +1075,7 @@ static void curl_free_slist(void **slist)
PHP_FUNCTION(curl_version)
{
curl_version_info_data *d;
long uversion = CURLVERSION_NOW;
long uversion = CURLVERSION_NOW;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &uversion) == FAILURE) {
return;
@@ -1057,7 +1105,8 @@ PHP_FUNCTION(curl_version)
array_init(protocol_list);
while (*p != NULL) {
add_next_index_string(protocol_list, *p++, 1);
add_next_index_string(protocol_list, *p, 1);
p++;
}
CAAZ("protocols", protocol_list);
}
@@ -1076,9 +1125,9 @@ static void alloc_curl_handle(php_curl **ch)
(*ch)->in_callback = 0;
(*ch)->header.str_len = 0;
memset(&(*ch)->err, 0, sizeof((*ch)->err));
#if LIBCURL_VERSION_NUM < 0x071101
zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0);
#endif
@@ -1091,10 +1140,11 @@ static void alloc_curl_handle(php_curl **ch)
Initialize a cURL session */
PHP_FUNCTION(curl_init)
{
zval **url;
php_curl *ch;
CURL *cp;
int argc = ZEND_NUM_ARGS();
php_curl *ch;
zval **url;
zval *clone;
CURL *cp;
int argc = ZEND_NUM_ARGS();
if (argc < 0 || argc > 1 || zend_get_parameters_ex(argc, &url) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1102,7 +1152,6 @@ PHP_FUNCTION(curl_init)
if (argc > 0) {
convert_to_string_ex(url);
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(url), Z_STRLEN_PP(url), (void) NULL);
}
cp = curl_easy_init();
@@ -1115,7 +1164,7 @@ PHP_FUNCTION(curl_init)
TSRMLS_SET_CTX(ch->thread_ctx);
ch->cp = cp;
ch->handlers->write->method = PHP_CURL_STDOUT;
ch->handlers->write->type = PHP_CURL_ASCII;
ch->handlers->read->method = PHP_CURL_DIRECT;
@@ -1123,6 +1172,9 @@ PHP_FUNCTION(curl_init)
ch->uses = 0;
MAKE_STD_ZVAL(clone);
ch->clone = clone;
curl_easy_setopt(ch->cp, CURLOPT_NOPROGRESS, 1);
curl_easy_setopt(ch->cp, CURLOPT_VERBOSE, 0);
curl_easy_setopt(ch->cp, CURLOPT_ERRORBUFFER, ch->err.str);
@@ -1140,15 +1192,10 @@ PHP_FUNCTION(curl_init)
#endif
if (argc > 0) {
#if LIBCURL_VERSION_NUM >= 0x071100
curl_easy_setopt(ch->cp, CURLOPT_URL, Z_STRVAL_PP(url));
#else
char *urlcopy;
urlcopy = estrndup(Z_STRVAL_PP(url), Z_STRLEN_PP(url));
curl_easy_setopt(ch->cp, CURLOPT_URL, urlcopy);
zend_llist_add_element(&ch->to_free.str, &urlcopy);
#endif
if (!php_curl_option_url(ch, Z_STRVAL_PP(url), Z_STRLEN_PP(url))) {
_php_curl_close_ex(ch TSRMLS_CC);
RETURN_FALSE;
}
}
ZEND_REGISTER_RESOURCE(return_value, ch, le_curl);
@@ -1160,14 +1207,14 @@ PHP_FUNCTION(curl_init)
Copy a cURL handle along with all of it's preferences */
PHP_FUNCTION(curl_copy_handle)
{
zval **zid;
CURL *cp;
php_curl *ch;
php_curl *dupch;
CURL *cp;
zval **zid;
php_curl *ch, *dupch;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
WRONG_PARAM_COUNT;
}
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
cp = curl_easy_duphandle(ch->cp);
@@ -1180,10 +1227,23 @@ PHP_FUNCTION(curl_copy_handle)
TSRMLS_SET_CTX(dupch->thread_ctx);
dupch->cp = cp;
dupch->uses = 0;
if (ch->handlers->write->stream) {
zval_add_ref(dupch->handlers->write->stream);
dupch->handlers->write->stream = ch->handlers->write->stream;
}
dupch->handlers->write->method = ch->handlers->write->method;
dupch->handlers->write->type = ch->handlers->write->type;
if (ch->handlers->read->stream) {
zval_add_ref(ch->handlers->read->stream);
}
dupch->handlers->read->stream = ch->handlers->read->stream;
dupch->handlers->read->method = ch->handlers->read->method;
dupch->handlers->write_header->method = ch->handlers->write_header->method;
if (ch->handlers->write_header->stream) {
zval_add_ref(ch->handlers->write_header->stream);
}
dupch->handlers->write_header->stream = ch->handlers->write_header->stream;
dupch->handlers->write->fp = ch->handlers->write->fp;
dupch->handlers->write_header->fp = ch->handlers->write_header->fp;
@@ -1222,6 +1282,10 @@ PHP_FUNCTION(curl_copy_handle)
zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist);
zend_llist_copy(&dupch->to_free.post, &ch->to_free.post);
/* Keep track of cloned copies to avoid invoking curl destructors for every clone */
ch->clone->refcount++;
dupch->clone = ch->clone;
ZEND_REGISTER_RESOURCE(return_value, dupch, le_curl);
dupch->id = Z_LVAL_P(return_value);
}
@@ -1302,8 +1366,20 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
case CURLOPT_COOKIESESSION:
#if LIBCURL_VERSION_NUM > 0x070b01 /* CURLOPT_TCP_NODELAY is available since curl 7.11.2 */
case CURLOPT_TCP_NODELAY:
#endif
#if LIBCURL_VERSION_NUM >= 0x71304
case CURLOPT_REDIR_PROTOCOLS:
case CURLOPT_PROTOCOLS:
#endif
convert_to_long_ex(zvalue);
#if LIBCURL_VERSION_NUM >= 0x71304
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&
((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) && (Z_LVAL_PP(zvalue) & CURLPROTO_FILE)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLPROTO_FILE cannot be activated when in safe_mode or an open_basedir is set");
RETVAL_FALSE;
return 1;
}
#endif
error = curl_easy_setopt(ch->cp, option, Z_LVAL_PP(zvalue));
break;
case CURLOPT_FOLLOWLOCATION:
@@ -1329,47 +1405,50 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
case CURLOPT_COOKIE:
case CURLOPT_REFERER:
case CURLOPT_INTERFACE:
case CURLOPT_KRB4LEVEL:
case CURLOPT_KRB4LEVEL:
case CURLOPT_EGDSOCKET:
case CURLOPT_CAINFO:
case CURLOPT_CAINFO:
case CURLOPT_CAPATH:
case CURLOPT_SSL_CIPHER_LIST:
case CURLOPT_SSL_CIPHER_LIST:
case CURLOPT_SSLKEY:
case CURLOPT_SSLKEYTYPE:
case CURLOPT_SSLKEYPASSWD:
case CURLOPT_SSLENGINE:
case CURLOPT_SSLKEYTYPE:
case CURLOPT_SSLKEYPASSWD:
case CURLOPT_SSLENGINE:
case CURLOPT_SSLENGINE_DEFAULT:
case CURLOPT_SSLCERTTYPE:
case CURLOPT_ENCODING: {
case CURLOPT_ENCODING:
{
#if LIBCURL_VERSION_NUM < 0x071100
char *copystr = NULL;
#endif
convert_to_string_ex(zvalue);
if (option == CURLOPT_URL) {
PHP_CURL_CHECK_OPEN_BASEDIR(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue), 1);
}
if (!php_curl_option_url(ch, Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue))) {
RETVAL_FALSE;
return 1;
}
} else {
#if LIBCURL_VERSION_NUM >= 0x071100
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
/* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */
error = curl_easy_setopt(ch->cp, option, Z_STRVAL_PP(zvalue));
#else
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free.str, &copystr);
copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, option, copystr);
zend_llist_add_element(&ch->to_free.str, &copystr);
#endif
}
break;
}
case CURLOPT_FILE:
case CURLOPT_INFILE:
case CURLOPT_INFILE:
case CURLOPT_WRITEHEADER:
case CURLOPT_STDERR: {
FILE *fp = NULL;
int type;
void * what;
what = zend_fetch_resource(zvalue TSRMLS_CC, -1, "File-Handle", &type, 1, php_file_le_stream());
if (!what) {
RETVAL_FALSE;
@@ -1389,18 +1468,49 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
error = CURLE_OK;
switch (option) {
case CURLOPT_FILE:
ch->handlers->write->fp = fp;
ch->handlers->write->method = PHP_CURL_FILE;
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
zval_add_ref(zvalue);
ch->handlers->write->fp = fp;
ch->handlers->write->method = PHP_CURL_FILE;
ch->handlers->write->stream = *zvalue;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
RETVAL_FALSE;
return 1;
}
break;
case CURLOPT_WRITEHEADER:
ch->handlers->write_header->fp = fp;
ch->handlers->write_header->method = PHP_CURL_FILE;
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
zval_add_ref(zvalue);
ch->handlers->write_header->fp = fp;
ch->handlers->write_header->method = PHP_CURL_FILE;
ch->handlers->write_header->stream = *zvalue;
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
RETVAL_FALSE;
return 1;
}
break;
case CURLOPT_INFILE:
zend_list_addref(Z_LVAL_PP(zvalue));
zval_add_ref(zvalue);
ch->handlers->read->fp = fp;
ch->handlers->read->fd = Z_LVAL_PP(zvalue);
ch->handlers->read->stream = *zvalue;
break;
case CURLOPT_STDERR:
if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') {
if (ch->handlers->std_err) {
zval_ptr_dtor(&ch->handlers->std_err);
}
zval_add_ref(zvalue);
ch->handlers->std_err = *zvalue;
zend_list_addref(Z_LVAL_PP(zvalue));
} else {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable");
RETVAL_FALSE;
return 1;
}
/* break omitted intentionally */
default:
error = curl_easy_setopt(ch->cp, option, fp);
break;
@@ -1418,7 +1528,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
}
break;
case CURLOPT_BINARYTRANSFER:
convert_to_long_ex(zvalue);
convert_to_long_ex(zvalue);
if (Z_LVAL_PP(zvalue)) {
ch->handlers->write->type = PHP_CURL_BINARY;
@@ -1476,8 +1586,8 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
uint string_key_len;
postfields = HASH_OF(*zvalue);
if (! postfields) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
if (!postfields) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't get HashTable in CURLOPT_POSTFIELDS");
RETVAL_FALSE;
return 1;
}
@@ -1491,48 +1601,45 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
convert_to_string_ex(current);
zend_hash_get_current_key_ex(postfields, &string_key, &string_key_len, &num_key, 0, NULL);
postval = Z_STRVAL_PP(current);
/* The arguments after _NAMELENGTH and _CONTENTSLENGTH
* must be explicitly cast to long in curl_formadd
* use since curl needs a long not an int. */
if (*postval == '@') {
char *type;
char *type, *filename;
++postval;
if ((type = php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + strlen(postval)))) {
if ((type = php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + Z_STRLEN_PP(current)))) {
*type = '\0';
}
if ((filename = php_memnstr(postval, ";filename=", sizeof(";filename=") - 1, postval + Z_STRLEN_PP(current)))) {
*filename = '\0';
}
/* safe_mode / open_basedir check */
if (php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && !php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
if (type) {
*type = ';';
}
RETVAL_FALSE;
return 1;
}
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
CURLFORM_FILENAME, filename ? filename + sizeof(";filename=") - 1 : postval,
CURLFORM_CONTENTTYPE, type ? type + sizeof(";type=") - 1 : "application/octet-stream",
CURLFORM_FILE, postval,
CURLFORM_END);
if (type) {
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
CURLFORM_FILE, postval,
CURLFORM_CONTENTTYPE, type + sizeof(";type=") - 1,
CURLFORM_END);
*type = ';';
} else {
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
CURLFORM_FILE, postval,
CURLFORM_END);
}
if (filename) {
*filename = ';';
}
} else {
error = curl_formadd(&first, &last,
error = curl_formadd(&first, &last,
CURLFORM_COPYNAME, string_key,
CURLFORM_NAMELENGTH, (long)string_key_len - 1,
CURLFORM_COPYCONTENTS, postval,
CURLFORM_COPYCONTENTS, postval,
CURLFORM_CONTENTSLENGTH, (long)Z_STRLEN_PP(current),
CURLFORM_END);
}
@@ -1549,6 +1656,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
} else {
#if LIBCURL_VERSION_NUM >= 0x071101
convert_to_string_ex(zvalue);
/* with curl 7.17.0 and later, we can use COPYPOSTFIELDS, but we have to provide size before */
error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, Z_STRLEN_PP(zvalue));
error = curl_easy_setopt(ch->cp, CURLOPT_COPYPOSTFIELDS, Z_STRVAL_PP(zvalue));
@@ -1564,7 +1672,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
#endif
}
break;
case CURLOPT_HTTPHEADER:
case CURLOPT_HTTPHEADER:
case CURLOPT_QUOTE:
case CURLOPT_HTTP200ALIASES:
case CURLOPT_POSTQUOTE: {
@@ -1588,7 +1696,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
slist = curl_slist_append(slist, Z_STRVAL_PP(current));
if (!slist) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not build curl_slist");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not build curl_slist");
RETVAL_FALSE;
return 1;
}
@@ -1655,7 +1763,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
PHP_FUNCTION(curl_setopt)
{
zval **zid, **zoption, **zvalue;
php_curl *ch;
php_curl *ch;
if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &zid, &zoption, &zvalue) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1679,24 +1787,24 @@ PHP_FUNCTION(curl_setopt_array)
{
zval *zid, *arr, **entry;
php_curl *ch;
long option;
ulong option;
HashPosition pos;
char *string_key;
int str_key_len;
char *string_key;
uint str_key_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "za", &zid, &arr) == FAILURE) {
RETURN_FALSE;
return;
}
ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl);
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(arr), &pos);
while (zend_hash_get_current_data_ex(Z_ARRVAL_P(arr), (void **)&entry, &pos) == SUCCESS) {
if (zend_hash_get_current_key_ex(Z_ARRVAL_P(arr), &string_key, &str_key_len, &option, 0, &pos) == HASH_KEY_IS_STRING) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array keys must be CURLOPT constants or equivalent integer values");
if (zend_hash_get_current_key_ex(Z_ARRVAL_P(arr), &string_key, &str_key_len, &option, 0, &pos) != HASH_KEY_IS_LONG) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Array keys must be CURLOPT constants or equivalent integer values");
RETURN_FALSE;
}
if (_php_curl_setopt(ch, option, entry, return_value TSRMLS_CC)) {
if (_php_curl_setopt(ch, (long) option, entry, return_value TSRMLS_CC)) {
RETURN_FALSE;
}
zend_hash_move_forward_ex(Z_ARRVAL_P(arr), &pos);
@@ -1705,7 +1813,7 @@ PHP_FUNCTION(curl_setopt_array)
}
/* }}} */
/* {{{ _php_curl_cleanup_handle(ch)
/* {{{ _php_curl_cleanup_handle(ch)
Cleanup an execution phase */
void _php_curl_cleanup_handle(php_curl *ch)
{
@@ -1726,9 +1834,9 @@ void _php_curl_cleanup_handle(php_curl *ch)
Perform a cURL session */
PHP_FUNCTION(curl_exec)
{
zval **zid;
php_curl *ch;
CURLcode error;
CURLcode error;
zval **zid;
php_curl *ch;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1737,7 +1845,7 @@ PHP_FUNCTION(curl_exec)
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
_php_curl_cleanup_handle(ch);
error = curl_easy_perform(ch->cp);
SAVE_CURL_ERROR(ch, error);
/* CURLE_PARTIAL_FILE is returned by HEAD requests */
@@ -1748,14 +1856,19 @@ PHP_FUNCTION(curl_exec)
RETURN_FALSE;
}
ch->uses++;
if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.len > 0) {
--ch->uses;
smart_str_0(&ch->handlers->write->buf);
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
}
--ch->uses;
/* flush the file handle, so any remaining data is synched to disk */
if (ch->handlers->write->method == PHP_CURL_FILE && ch->handlers->write->fp) {
fflush(ch->handlers->write->fp);
}
if (ch->handlers->write_header->method == PHP_CURL_FILE && ch->handlers->write_header->fp) {
fflush(ch->handlers->write_header->fp);
}
if (ch->handlers->write->method == PHP_CURL_RETURN) {
RETURN_EMPTY_STRING();
} else {
@@ -1768,10 +1881,9 @@ PHP_FUNCTION(curl_exec)
Get information regarding a specific transfer */
PHP_FUNCTION(curl_getinfo)
{
zval **zid,
**zoption;
php_curl *ch;
int option, argc = ZEND_NUM_ARGS();
zval **zid, **zoption;
php_curl *ch;
int option, argc = ZEND_NUM_ARGS();
if (argc < 1 || argc > 2 || zend_get_parameters_ex(argc, &zid, &zoption) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1860,22 +1972,22 @@ PHP_FUNCTION(curl_getinfo)
option = Z_LVAL_PP(zoption);
switch (option) {
case CURLINFO_PRIVATE:
case CURLINFO_EFFECTIVE_URL:
case CURLINFO_EFFECTIVE_URL:
case CURLINFO_CONTENT_TYPE: {
char *s_code = NULL;
char *s_code = NULL;
if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
RETURN_STRING(s_code, 1);
} else {
RETURN_FALSE;
}
if (curl_easy_getinfo(ch->cp, option, &s_code) == CURLE_OK && s_code) {
RETURN_STRING(s_code, 1);
} else {
RETURN_FALSE;
}
break;
}
case CURLINFO_HTTP_CODE:
case CURLINFO_HEADER_SIZE:
case CURLINFO_REQUEST_SIZE:
case CURLINFO_FILETIME:
case CURLINFO_SSL_VERIFYRESULT:
case CURLINFO_HTTP_CODE:
case CURLINFO_HEADER_SIZE:
case CURLINFO_REQUEST_SIZE:
case CURLINFO_FILETIME:
case CURLINFO_SSL_VERIFYRESULT:
case CURLINFO_REDIRECT_COUNT: {
long code = 0;
@@ -1886,16 +1998,16 @@ PHP_FUNCTION(curl_getinfo)
}
break;
}
case CURLINFO_TOTAL_TIME:
case CURLINFO_NAMELOOKUP_TIME:
case CURLINFO_TOTAL_TIME:
case CURLINFO_NAMELOOKUP_TIME:
case CURLINFO_CONNECT_TIME:
case CURLINFO_PRETRANSFER_TIME:
case CURLINFO_SIZE_UPLOAD:
case CURLINFO_PRETRANSFER_TIME:
case CURLINFO_SIZE_UPLOAD:
case CURLINFO_SIZE_DOWNLOAD:
case CURLINFO_SPEED_DOWNLOAD:
case CURLINFO_SPEED_UPLOAD:
case CURLINFO_SPEED_DOWNLOAD:
case CURLINFO_SPEED_UPLOAD:
case CURLINFO_CONTENT_LENGTH_DOWNLOAD:
case CURLINFO_CONTENT_LENGTH_UPLOAD:
case CURLINFO_CONTENT_LENGTH_UPLOAD:
case CURLINFO_STARTTRANSFER_TIME:
case CURLINFO_REDIRECT_TIME: {
double code = 0.0;
@@ -1922,9 +2034,9 @@ PHP_FUNCTION(curl_getinfo)
Return a string contain the last error for the current session */
PHP_FUNCTION(curl_error)
{
zval **zid;
php_curl *ch;
zval **zid;
php_curl *ch;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1940,8 +2052,8 @@ PHP_FUNCTION(curl_error)
Return an integer containing the last error number */
PHP_FUNCTION(curl_errno)
{
zval **zid;
php_curl *ch;
zval **zid;
php_curl *ch;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1957,8 +2069,8 @@ PHP_FUNCTION(curl_errno)
Close a cURL session */
PHP_FUNCTION(curl_close)
{
zval **zid;
php_curl *ch;
zval **zid;
php_curl *ch;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &zid) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1970,8 +2082,8 @@ PHP_FUNCTION(curl_close)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Attempt to close cURL handle from a callback");
return;
}
if (ch->uses) {
if (ch->uses) {
ch->uses--;
} else {
zend_list_delete(Z_LVAL_PP(zid));
@@ -1981,20 +2093,34 @@ PHP_FUNCTION(curl_close)
/* {{{ _php_curl_close()
List destructor for curl handles */
static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
static void _php_curl_close_ex(php_curl *ch TSRMLS_DC)
{
php_curl *ch = (php_curl *) rsrc->ptr;
#if PHP_CURL_DEBUG
fprintf(stderr, "DTOR CALLED, ch = %x\n", ch);
#endif
/* Prevent crash inside cURL if passed file has already been closed */
if (ch->handlers->std_err && ch->handlers->std_err->refcount <= 0) {
curl_easy_setopt(ch->cp, CURLOPT_STDERR, stderr);
}
curl_easy_cleanup(ch->cp);
#if LIBCURL_VERSION_NUM < 0x071101
zend_llist_clean(&ch->to_free.str);
#endif
zend_llist_clean(&ch->to_free.slist);
zend_llist_clean(&ch->to_free.post);
/* cURL destructors should be invoked only by last curl handle */
if (ch->clone->refcount <= 1) {
zend_llist_clean(&ch->to_free.slist);
zend_llist_clean(&ch->to_free.post);
FREE_ZVAL(ch->clone);
} else {
ch->clone->refcount--;
ch->to_free.slist.dtor = NULL;
ch->to_free.post.dtor = NULL;
zend_llist_clean(&ch->to_free.slist);
zend_llist_clean(&ch->to_free.post);
}
if (ch->handlers->write->buf.len > 0) {
smart_str_free(&ch->handlers->write->buf);
@@ -2011,16 +2137,38 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
if (ch->handlers->passwd) {
zval_ptr_dtor(&ch->handlers->passwd);
}
if (ch->handlers->std_err) {
zval_ptr_dtor(&ch->handlers->std_err);
}
if (ch->header.str_len > 0) {
efree(ch->header.str);
}
if (ch->handlers->write_header->stream) {
zval_ptr_dtor(&ch->handlers->write_header->stream);
}
if (ch->handlers->write->stream) {
zval_ptr_dtor(&ch->handlers->write->stream);
}
if (ch->handlers->read->stream) {
zval_ptr_dtor(&ch->handlers->read->stream);
}
efree(ch->handlers->write);
efree(ch->handlers->write_header);
efree(ch->handlers->read);
efree(ch->handlers);
efree(ch);
}
}
/* }}} */
/* {{{ _php_curl_close()
List destructor for curl handles */
static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC)
{
php_curl *ch = (php_curl *) rsrc->ptr;
_php_curl_close_ex(ch TSRMLS_CC);
}
/* }}} */
#endif /* HAVE_CURL */
+4
View File
@@ -86,6 +86,7 @@ typedef struct {
smart_str buf;
int method;
int type;
zval *stream;
} php_curl_write;
typedef struct {
@@ -94,6 +95,7 @@ typedef struct {
FILE *fp;
long fd;
int method;
zval *stream;
} php_curl_read;
typedef struct {
@@ -101,6 +103,7 @@ typedef struct {
php_curl_write *write_header;
php_curl_read *read;
zval *passwd;
zval *std_err;
} php_curl_handlers;
struct _php_curl_error {
@@ -131,6 +134,7 @@ typedef struct {
long id;
unsigned int uses;
zend_bool in_callback;
zval *clone;
} php_curl;
typedef struct {
+56 -19
View File
@@ -48,6 +48,7 @@
#include "ext/standard/php_smart_str.h"
#include "ext/standard/info.h"
#include "ext/standard/file.h"
#include "ext/standard/php_string.h"
#include "php_curl.h"
static size_t on_data_available(char *data, size_t size, size_t nmemb, void *ctx)
@@ -128,7 +129,7 @@ static int on_progress_avail(php_stream *stream, double dltotal, double dlnow, d
/* our notification system only works in a single direction; we should detect which
* direction is important and use the correct values in this call */
php_stream_notify_progress(stream->context, dlnow, dltotal);
php_stream_notify_progress(stream->context, (size_t) dlnow, (size_t) dltotal);
return 0;
}
@@ -166,7 +167,8 @@ static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count T
tv.tv_sec = 15; /* TODO: allow this to be configured from the script */
/* wait for data */
switch (select(curlstream->maxfd + 1, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
switch ((curlstream->maxfd < 0) ? 1 :
select(curlstream->maxfd + 1, &curlstream->readfds, &curlstream->writefds, &curlstream->excfds, &tv)) {
case -1:
/* error */
return 0;
@@ -179,7 +181,8 @@ static size_t php_curl_stream_read(php_stream *stream, char *buf, size_t count T
curlstream->mcode = curl_multi_perform(curlstream->multi, &curlstream->pending);
} while (curlstream->mcode == CURLM_CALL_MULTI_PERFORM);
}
} while (curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending > 0);
} while (curlstream->maxfd >= 0 &&
curlstream->readbuffer.readpos >= curlstream->readbuffer.writepos && curlstream->pending > 0);
}
@@ -258,6 +261,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
php_stream *stream;
php_curl_stream *curlstream;
zval *tmp, **ctx_opt = NULL;
struct curl_slist *slist = NULL;
curlstream = emalloc(sizeof(php_curl_stream));
memset(curlstream, 0, sizeof(php_curl_stream));
@@ -306,6 +310,15 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
/* TODO: read cookies and options from context */
if (context && !strncasecmp(filename, "http", sizeof("http")-1)) {
/* Protocol version */
if (SUCCESS == php_stream_context_get_option(context, "http", "protocol_version", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_DOUBLE) {
if (Z_DVAL_PP(ctx_opt) == 1.1) {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
} else {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0);
}
}
if (SUCCESS == php_stream_context_get_option(context, "http", "curl_verify_ssl_host", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_BOOL && Z_LVAL_PP(ctx_opt) == 1) {
curl_easy_setopt(curlstream->curl, CURLOPT_SSL_VERIFYHOST, 1);
} else {
@@ -321,20 +334,34 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
if (SUCCESS == php_stream_context_get_option(context, "http", "user_agent", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
curl_easy_setopt(curlstream->curl, CURLOPT_USERAGENT, Z_STRVAL_PP(ctx_opt));
}
if (SUCCESS == php_stream_context_get_option(context, "http", "header", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_ARRAY) {
HashPosition pos;
zval **header = NULL;
struct curl_slist *hl = NULL;
if (SUCCESS == php_stream_context_get_option(context, "http", "header", &ctx_opt)) {
if (Z_TYPE_PP(ctx_opt) == IS_ARRAY) {
HashPosition pos;
zval **header = NULL;
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(ctx_opt), &pos);
SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(ctx_opt), (void *)&header, &pos);
zend_hash_move_forward_ex(Z_ARRVAL_PP(ctx_opt), &pos)) {
if (Z_TYPE_PP(header) == IS_STRING) {
hl = curl_slist_append(hl, Z_STRVAL_PP(header));
for (zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(ctx_opt), &pos);
SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_PP(ctx_opt), (void *)&header, &pos);
zend_hash_move_forward_ex(Z_ARRVAL_PP(ctx_opt), &pos)
) {
if (Z_TYPE_PP(header) == IS_STRING) {
slist = curl_slist_append(slist, Z_STRVAL_PP(header));
}
}
} else if (Z_TYPE_PP(ctx_opt) == IS_STRING && Z_STRLEN_PP(ctx_opt)) {
char *p, *token, *trimmed, *copy_ctx_opt;
copy_ctx_opt = php_trim(Z_STRVAL_PP(ctx_opt), Z_STRLEN_PP(ctx_opt), NULL, 0, NULL, 3 TSRMLS_CC);
p = php_strtok_r(copy_ctx_opt, "\r\n", &token);
while (p) {
trimmed = php_trim(p, strlen(p), NULL, 0, NULL, 3 TSRMLS_CC);
slist = curl_slist_append(slist, trimmed);
efree(trimmed);
p = php_strtok_r(NULL, "\r\n", &token);
}
efree(copy_ctx_opt);
}
if (hl) {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, hl);
if (slist) {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, slist);
}
}
if (SUCCESS == php_stream_context_get_option(context, "http", "method", &ctx_opt) && Z_TYPE_PP(ctx_opt) == IS_STRING) {
@@ -444,8 +471,7 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
#else
php_error_docref(NULL TSRMLS_CC, E_WARNING, "There was an error mcode=%d", m);
#endif
php_stream_close(stream);
return NULL;
goto exit_fail;
}
/* we have only one curl handle here, even though we use multi syntax,
@@ -463,12 +489,23 @@ php_stream *php_curl_stream_opener(php_stream_wrapper *wrapper, char *filename,
}
}
if (msg_found) {
php_stream_close(stream);
return NULL;
goto exit_fail;
}
}
/* context headers are not needed anymore */
if (slist) {
curl_easy_setopt(curlstream->curl, CURLOPT_HTTPHEADER, NULL);
curl_slist_free_all(slist);
}
return stream;
exit_fail:
php_stream_close(stream);
if (slist) {
curl_slist_free_all(slist);
}
return NULL;
}
static php_stream_wrapper_ops php_curl_wrapper_ops = {
+16
View File
@@ -1,5 +1,21 @@
--TEST--
Bug #45161 (Reusing a curl handle leaks memory)
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') {
exit("skip not for Windows");
}
if (!extension_loaded("curl")) {
exit("skip curl extension not loaded");
}
if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined");
}
$curl_version = curl_version();
if ($curl_version['version_number'] < 0x071100) {
exit("skip: test works only with curl >= 7.17.0");
}
?>
--FILE--
<?php
Loaded 100 of 2041 files, more files were not shown because too many files have changed in this diff. Show more