Compare commits

...
247 Commits
Author SHA1 Message Date
Ilia Alshanetsky dabfd7727f re-tag 2011-01-06 23:01:48 +00:00
Ilia Alshanetsky 30e646497e re-tag 2011-01-06 23:01:19 +00:00
Rasmus Lerdorf f3643fde6b Fix bug #53682 2011-01-06 22:48:20 +00:00
Ilia Alshanetsky 5861ec652d re-tag 2011-01-06 17:56:44 +00:00
Pierre Joye 6e6ad94882 - fix vc6 random behavior for Fix bug #53632 with x87 fpu 2011-01-06 17:19:16 +00:00
Pierre Joye c9cf4337ac - add CVE (too late for the release tho') 2011-01-06 12:51:35 +00:00
Ilia Alshanetsky 921abf906a Back to dev 2011-01-05 14:50:13 +00:00
Ilia Alshanetsky f14e5dfec6 5.2.17 2011-01-05 14:49:26 +00:00
Ilia Alshanetsky 17f4cf457e 5.2.17 2011-01-05 14:48:13 +00:00
Ilia Alshanetsky e41b42a6f6 MFH: Optimize unix timestamp to date-string conversion for very high year values 2011-01-05 14:47:27 +00:00
Scott MacVicar 9e080606bf Add test for bug #53632 2011-01-04 23:36:56 +00:00
Scott MacVicar bbf128759d Fix bug #53632 with x87 fpu 2011-01-04 22:36:23 +00:00
Eyal Teutsch 43dbfebb58 fixed 6 tests to pass on non-linux os, by removing the generic linux error string from the exp result. on socket_strerror on the other hand, added to the SKIPIF a condition to run on linux only, as the test checks specifically various error strings 2010-12-26 13:10:23 +00:00
Ilia Alshanetsky e3e7c70da5 back to dev 2010-12-15 13:47:14 +00:00
Ilia Alshanetsky 643629a7b7 5.2.16 2010-12-15 13:37:15 +00:00
Eyal Teutsch 02a84b309f added value for PHP_MAXPATHLEN for os which is not windows/linux 2010-12-14 13:07:51 +00:00
Eyal Teutsch 6a911cd901 moved the second unlink() to the CLEAN section in the SplFileObject_fwrite_variation* tests 2010-12-12 07:24:51 +00:00
Martin Jansen cedbc50f9d Merge from trunk:
* Fixed parameter check introduced with the recent fix for bug #53492.

* Improved the error message along the way.
2010-12-11 20:10:15 +00:00
Felipe Pena 67db416711 - Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down)
patch by: gyp at balabit dot hu
2010-12-10 17:50:26 +00:00
Ilia Alshanetsky 726db3f295 Fixed bug #53516 (Regression in open_basedir handling). 2010-12-10 12:50:25 +00:00
Ilia Alshanetsky 20d7d216a9 back to dev 2010-12-09 19:36:06 +00:00
Ilia Alshanetsky 953b01e2f5 Re-branch 5.2.15 2010-12-09 19:35:13 +00:00
Pierre Joye ec20844001 - missing merge fix for #53352 2010-12-09 17:04:29 +00:00
Adam Harvey 5ab2577d63 Fix the next version number in NEWS. 2010-12-09 02:47:47 +00:00
Ilia Alshanetsky d08a99eaca Back to dev, one final time ;-) 2010-12-08 22:33:02 +00:00
Ilia Alshanetsky d85168ae7d 5.2.15 2010-12-08 22:30:48 +00:00
Ilia Alshanetsky 9501a3b81e Fixed bug #53492 (fix crash if anti-aliasing steps are invalid). 2010-12-08 22:30:12 +00:00
Eyal Teutsch 140a3a80df curl_setopt() arg: using DIRECTORY_SEPARATOR rather then "/" to make windows tests pass too 2010-12-08 14:16:17 +00:00
Felipe Pena 863ade64d8 - Fixed test (Eyal Teutsch) 2010-12-04 15:57:08 +00:00
Felipe Pena 0ef0372be2 - Fixed tests 2010-12-04 12:40:00 +00:00
Ilia Alshanetsky 8b7fe19996 Back to dev 2010-12-03 00:29:16 +00:00
Ilia Alshanetsky 0ad7e9b70c 5.2.15RC2 2010-12-03 00:13:07 +00:00
Pierre Joye 61924ece78 Fixed crash in zip extract method (possible CWE-170) 2010-11-30 11:04:06 +00:00
Felipe Pena b010e9fd50 - Fixed test 2010-11-23 21:45:22 +00:00
Felipe Pena d5d2580ac6 - Fixed extract() to do not overwrite $GLOBALS and $this when using EXTR_OVERWRITE.
patch by: jorto at redhat dot com
2010-11-19 22:06:44 +00:00
Ilia Alshanetsky 73d45d3ff3 Back to dev 2010-11-18 14:40:49 +00:00
Ilia Alshanetsky 3594dd8ceb One more try 2010-11-18 14:38:25 +00:00
Ilia Alshanetsky 938d2a4333 Back to dev 2010-11-18 14:35:34 +00:00
Ilia Alshanetsky de5d12e4f8 5.2.15RC1 2010-11-18 14:30:55 +00:00
Felipe Pena 4fc90faa39 - Fixed typo (reported by eyal.t at zend dot com) 2010-11-17 14:49:26 +00:00
Felipe Pena b13f58ea5c - Revert bad changes 2010-11-17 14:15:57 +00:00
Felipe Pena 4a6376afd8 - Updated QA and User note maintainers credits 2010-11-17 00:02:22 +00:00
Felipe Pena be51eb9c56 - Fixed bug #53323 (pdo_firebird getAttribute() crash)
patch by: preeves at ibphoenix dot com
2010-11-16 21:02:14 +00:00
Felipe Pena d0b8d0201b - Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4) 2010-11-11 21:25:34 +00:00
Moriyoshi Koizumi 8b47bc81f6 - Remove duplicate portion. 2010-11-09 03:27:11 +00:00
Moriyoshi Koizumi 1568b94545 - Fix bug #53273 (mb_strcut() returns garbage with the excessive length parameter). 2010-11-09 03:23:04 +00:00
Dmitry Stogov 37f3ce6232 Fixed WSDL loading using https through proxy 2010-11-08 11:34:32 +00:00
Patrick Allaert 2dd4a2915c - Fixed tests not passing under windows because of the directory separator
difference (thanks Eyal Teutsch for reporting)
2010-11-08 09:29:15 +00:00
Pierre Joye e07cf51051 - add CVE 2010-11-03 20:22:08 +00:00
Gustavo André dos Santos Lopes da38018b56 - Added fix to bug #49687 to PHP 5.2. 2010-11-03 14:18:28 +00:00
Ilia Alshanetsky 785bf5b31e Fixed a possible double free in imap extension (Identified by Mateusz Kocielski). 2010-11-02 17:50:39 +00:00
Pierre Joye b37ecc1a2d - fix Isotopp 2010-10-24 21:51:54 +00:00
Pierre Joye ab935ee86f - update #52929 and zip NULL deref 2010-10-19 10:16:58 +00:00
Pierre Joye 80bea65348 - fix Fixed NULL pointer dereference in ZipArchive::getArchiveComment, (CVE-2010-3709), report&patch from Maksymilian Arciemowicz 2010-10-19 09:55:36 +00:00
Kalle Sommer Nielsen c1b7bd348e Update copyright year for the license 2010-10-05 22:58:19 +00:00
Dmitry Stogov 105f312e99 Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy with SoapClient object). 2010-10-05 11:43:59 +00:00
Dmitry Stogov be89f9d922 Fixed bug #51008 (Zend/tests/bug45877.phpt fails) 2010-10-05 11:28:56 +00:00
Dmitry Stogov 01e081cfa7 Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry) 2010-10-01 09:49:20 +00:00
Adam Harvey 6df70d9e8f Loosen the valgrind version check slightly in run-tests.php so that it works
with the packaged valgrind in Ubuntu 10.04.
2010-09-30 11:16:45 +00:00
Adam Harvey dfea17c282 MFH: Fix for bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with
large amount of data).
2010-09-30 02:35:37 +00:00
Gustavo André dos Santos Lopes 1abeb58093 - Fixed bug #52944 (Invalid write on second and subsequent reads with an inflate filter fed invalid data). 2010-09-29 18:58:58 +00:00
Pierre Joye 83d7a705ad - Fixed possible flaw in open_basedir (CVE-2010-3436) 2010-09-28 13:30:20 +00:00
Pierre Joye 93cd101966 - Fixed possible flaw in open_basedir (CVE-2010-3436) 2010-09-28 13:28:55 +00:00
Kalle Sommer Nielsen 02f2359ad5 Fixed bug #52772 (var_dump() doesn't check for the existence of get_class_name before calling it) 2010-09-13 20:14:18 +00:00
Adam Harvey 0b9437483c Sorry, forgot the news update for the previous commit. 2010-08-24 17:00:23 +00:00
Adam Harvey 05fe229ea7 MFB5.3: The fix (and the fix to the fix) for bug #52546 (pdo_dblib segmentation
fault when iterating MONEY values).
2010-08-24 16:58:16 +00:00
Kalle Sommer Nielsen 1f34be323f Revert fix for #52636 in 5.2 2010-08-21 16:19:30 +00:00
Kalle Sommer Nielsen 7e2721e1b6 Use userland function name, not internal name for NEWS 2010-08-18 20:26:42 +00:00
Kalle Sommer Nielsen e6ef7dd895 Fixed possible crash in php_mssql_get_column_content_without_type()
# Also fix NEWS entry in PHP_5_2 for previous commit
2010-08-18 20:16:05 +00:00
Kalle Sommer Nielsen 31824b2c04 Fixed bug #52636 (php_mysql_fetch_hash writes long value into int)
# Tested by rein at basefarm dot no
2010-08-18 20:00:18 +00:00
Kalle Sommer Nielsen e3ec38a90f Fixed bug #50836 (run_tests.php alerts syntax errors while testing session) 2010-08-16 20:56:00 +00:00
Kalle Sommer Nielsen 2f129db790 Fix Windows build 2010-08-16 01:44:33 +00:00
Kalle Sommer Nielsen f9a562f63b Fixed bug #52593 (exif is placed before mbstring in php.ini) 2010-08-16 00:26:39 +00:00
Kalle Sommer Nielsen a954bcae9e Changed mysqli_report() to be per-request specific rather than per-process specific (Fixes #52390) 2010-08-13 10:43:15 +00:00
Sascha Schumann 984560f93d separate properties of internal classes in ZTS mode fully,
otherwise multiple threads will modify the zvals' contents
without any synchronisation.
2010-08-12 17:27:16 +00:00
Dmitry Stogov b6ffe2f92b In ZTS mode default properties and constants of internal classes can't be modified in place and have to be separated 2010-08-11 09:38:41 +00:00
Sriram Natarajan f810ef5359 - Fixed bug #52436 (Compile error in pcre if systems do not have stdint.h)
# PCRE's config.h can very well reuse the definitions made available from
# PHP's configure script output available within php_config.h
2010-07-27 21:42:22 +00:00
Johannes Schlüter 60cda42612 - back to -dev 2010-07-22 11:06:58 +00:00
Johannes Schlüter 95fb5ed9f2 - Add lost entries 2010-07-21 14:19:59 +00:00
Johannes Schlüter c863f476a5 PHP 5.2.14 2010-07-21 10:32:07 +00:00
Johannes Schlüter 5fdf15ea49 - merge NEWS for 5.2.14 and 5.3.3 2010-07-21 09:02:45 +00:00
Pierre Joye 7bc386b8dc - add CVE # 2010-07-20 09:26:18 +00:00
Adam Harvey 32e2c573d5 MFH: fix for bug #52317 (Segmentation fault when using mail() on a rhel 4.x
(only 64 bit)).
2010-07-19 13:38:53 +00:00
Johannes Schlüter 8370d1a864 Back to -dev 2010-07-14 22:59:20 +00:00
Johannes Schlüter c99bdaf6de PHP 5.2.14RC3 2010-07-14 22:03:47 +00:00
Dmitry Stogov 4eb9ceae9c Fixed incorrect reinitialization 2010-07-14 10:27:08 +00:00
Kalle Sommer Nielsen dcf54a9b4d Update the re2c files aswell (bug #51943) 2010-07-14 00:04:43 +00:00
Kalle Sommer Nielsen f407ad9511 Fixed bug #51943 (Several files are out of ANSI spec)
# Based on patch by CoreyStup at gmail dot com
2010-07-13 23:59:54 +00:00
Pierre Joye d3e8ab4266 - merge news for var_export fix 2010-07-13 18:56:05 +00:00
Pierre Joye e246625a57 - MFH: Fix a bug when var_export() causes a fatal error that could inadvertently display data due to flushing of the output buffer. 2010-07-13 18:53:12 +00:00
Kalle Sommer Nielsen e92d4a936d MFT: Fixed bug #52037 (Concurrent builds fail in install-programs) -- Patch by Seanius at debian dot org
# Sorry for the non sparse commit, due to a broken co
2010-07-13 17:24:44 +00:00
Timm Friebe 97033293d1 - MFT: Added -DSYB_LP64 to CFLAGS on 64 bit platforms
- MFT: Added checks for 64 bit versions of sybase libraries
- MFT: Added checks for sybase libraries prefixed with "libsyb"
2010-07-07 10:16:48 +00:00
Felipe Pena 08bdfef92a - Fixed tests 2010-07-06 00:25:52 +00:00
Dmitry Stogov 9d3069ca51 Fixed bug #52237 (Crash when passing the reference of the property of a non-object) 2010-07-05 09:08:35 +00:00
Johannes Schlüter 832fb5a6ea Fix bug #52238: Crash when an Exception occured in iterator_to_array 2010-07-02 19:17:45 +00:00
Felipe Pena 51db77f424 - Added CVE id 2010-07-02 19:16:21 +00:00
Felipe Pena d71b9d508e - Fixed a possible interruption array leak in trim() 2010-07-02 00:33:42 +00:00
Felipe Pena 22dcb6114f - BFN 2010-07-01 21:59:41 +00:00
Felipe Pena 631f9905f2 - Fixed a possible memory corruption in substr(), chunk_split(), strtok(), addcslashes(), str_repeat() 2010-07-01 19:51:36 +00:00
Felipe Pena 4b0840e246 - Fixed a possible memory corruption in strchr(), strstr().
- MFH: Fixed a possible memory corruption in substr_replace() (Dmitry)
2010-07-01 19:11:01 +00:00
Felipe Pena 01149527a9 - Fixed a possible memory corruption in strrchr(). (Reported by Péter Veres) 2010-07-01 18:43:52 +00:00
Ilia Alshanetsky 97518d37b3 Back to dev 2010-07-01 14:41:17 +00:00
Ilia Alshanetsky 802bc19f76 5.2.14RC2 2010-07-01 14:39:57 +00:00
Ilia Alshanetsky e0b76f3725 Fixed bug #33210 (getimagesize() fails to detect width/height on certain JPEGs). 2010-06-30 12:21:35 +00:00
Stanislav Malyshev e04a7b8cc4 fix SplObjectStorage unserialization (CVE-2010-2225) 2010-06-29 00:58:31 +00:00
Felipe Pena 9a2a615af2 - Reverted fix for bug #51421 2010-06-28 16:37:57 +00:00
Felipe Pena ec29c67a5a - BFN 2010-06-26 22:07:04 +00:00
Felipe Pena dcb44b5ed7 - Fixed bug #51421 (Abstract __construct constructor argument list not enforced) 2010-06-26 22:05:13 +00:00
Felipe Pena 2cd05f8579 - Fixed bug #52160 (Invalid E_STRICT redefined constructor error) 2010-06-26 19:19:16 +00:00
Felipe Pena 4b0ca8a569 - Fixed bug #52163 (SplFileObject::fgetss() fails due to parameter that can't be set) [already fixed on other branches] 2010-06-24 23:10:39 +00:00
Sriram Natarajan 9ce4941ec9 - Fixed bug #52162 (custom request header variables with numbers are removed) 2010-06-23 19:06:33 +00:00
Felipe Pena 1b59a2cb3c - Fixed bug #49730 (Firebird - new PDO() returns NULL) 2010-06-21 21:38:35 +00:00
Felipe Pena 31321a87ac - Completed the fix for bug #52010
# Fixing pdo drivers
2010-06-20 14:12:06 +00:00
Felipe Pena eb6862369b - BFN 2010-06-19 22:24:51 +00:00
Felipe Pena 1342ff0075 - Lets use zend_atol() here too (sync with 5_3) 2010-06-19 22:23:01 +00:00
Felipe Pena b0e2e6f752 - Fixed bug #52061 (memory_limit above 2G)
# MFH: zend_atol()
2010-06-19 20:47:24 +00:00
Ilia Alshanetsky bce3eee5be back to dev 2010-06-17 11:55:17 +00:00
Ilia Alshanetsky a71f036ed4 5.2.14RC1 2010-06-17 11:53:21 +00:00
Felipe Pena bdf58d657d - BFN 2010-06-16 23:40:23 +00:00
Felipe Pena 5bf26f9a90 - New tests related to #52098 2010-06-16 23:33:01 +00:00
Felipe Pena 93cd95fb35 - Fix crash when calling a method of a class that inherits PDOStatement if instantiated directly 2010-06-16 23:13:29 +00:00
Timm Friebe 0be3000729 - MFT: Fixed segmentation fault when reading rows
# Problem surfaces when using FreeTDS, ASE 12.5 and reading text fields
# with NULL values. This is essentially a workaround for a bug in Free-
# TDS which is not setting the NULL indicators correctly, but provides
# a protection against possible segfaults if any other driver ever does
# this again:-)
2010-06-16 09:53:51 +00:00
Felipe Pena 72f2f30daa - New entries 2010-06-15 19:37:20 +00:00
Dmitry Stogov 113d07c981 Fixed bug #52041 (Memory leak when writing on uninitialized variable returned from function) 2010-06-15 08:22:51 +00:00
Felipe Pena 6b74d61957 - Fix entry 2010-06-12 22:09:13 +00:00
Felipe Pena f6da451f59 - Fixed bug #49320 (PDO returns null when SQLite connection fails) 2010-06-12 22:04:48 +00:00
Patrick Allaert 64ab802e47 - Fixed bug #52019 (make lcov doesn't support TESTS variable anymore) 2010-06-11 14:04:57 +00:00
Dmitry Stogov 7690b8dad4 Fixed bug #51552 (debug_backtrace() causes segmentation fault and/or memory issues) 2010-06-11 08:53:31 +00:00
Dmitry Stogov 2c0763aeb4 Fixed bug #51822i (Segfault with strange __destruct() for static class variables) 2010-06-10 11:45:51 +00:00
Ilia Alshanetsky 432acf6178 Fixed bug #51273 (Faultstring property does not exist when the faultstring is empty)
# Patch by dennis at transip dot nl
2010-06-09 15:48:22 +00:00
Sriram Natarajan 708cd15924 - Fixed Bug #51168 (fails to compile with Sun Studio)
# C99 standard supports inline keyword and supported by
 # by major compilers like GCC, HP C, IBM C and Sun C
2010-06-08 21:23:48 +00:00
Christopher Jones 4a80c7f0a5 New test for file_exists (bug #39863). It currently xfail's 2010-06-05 19:44:48 +00:00
Felipe Pena 73f91cbbb1 - Fix tests 2010-06-05 15:37:25 +00:00
Felipe Pena 81b03712d2 - Fix wrong zval_ptr_dtor call 2010-06-05 15:25:18 +00:00
Felipe Pena b56a3804fd - Fix memleak when passing a non string/object parameter 2010-06-03 00:43:37 +00:00
Rasmus Lerdorf 281a546df9 vim fail 2010-06-02 19:26:10 +00:00
Rasmus Lerdorf c7d29533a1 Tweak the fix for bug #51847 to still call libintl_setlocale
when libintl has done that redefine.
2010-06-02 19:24:36 +00:00
Rasmus Lerdorf 83e13b2f2b Fix for bug #51847
Someone in libintl world decided it was a good idea to do:

#undef setlocale
#define setlocale libintl_setlocale

That means, of course, that any use of "setlocale" by the
preprocessor now becomes libintl_setlocale which means we
no longer have a _zif_setlocale symbol in string.o, but we
magically have a _zif_libintl_setlocale symbol.  The linker
is obviously not very happy about this when basic_functions.o
tries to find _zif_setlocale.

So, let's not do that again.
2010-06-02 05:53:13 +00:00
Dmitry Stogov c554397e1a Fixed bug #50762 (in WSDL mode Soap Header handler function only being called if defined in WSDL). (mephius at gmail dot com) 2010-05-28 10:52:16 +00:00
Felipe Pena f17687150b - Fixed bug #51905 (ReflectionParameter fails if default value is an array with an access to self::) 2010-05-26 00:00:58 +00:00
Felipe Pena bb43ac40d2 - Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with constant array) 2010-05-25 22:46:17 +00:00
Raphael Geissert ec1478e8c2 Document CGI options in the manpage (bug #51718)
Patch by Daniel Egeberg
2010-05-11 15:07:31 +00:00
Felipe Pena 0eec9e1932 - Fixed bug #51740 (acinclude.m4 macro PHP_CHECK_SIZEOF is not properly quoted)
Patch by: dave dot mulford at gmail dot com
2010-05-05 21:55:44 +00:00
Rob Richards 5c12e104ad fix bug #48601 (xpath() returns FALSE for legitimate query)
add test
2010-05-05 11:40:11 +00:00
Dmitry Stogov 67cfe5fca1 Fixed bug #50698 (SoapClient should handle wsdls with some incompatiable endpoints). (Justin Dearing) 2010-05-05 07:43:45 +00:00
Adam Harvey a44f1c17bc Fix for bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
Thanks to Hiroaki Kawai for the original patch.
2010-05-04 11:56:59 +00:00
Pierre Joye 08b100677e - revert #51273 2010-05-03 19:53:02 +00:00
Pierre Joye 90f3d470c3 - revert as vc6 does not support strtoi64, update to 5.3 will be the fix 2010-05-03 19:08:26 +00:00
Pierre Joye e779300748 - #51273, Content-length header is limited to 32bit integer with apache2/windows 2010-05-03 17:47:58 +00:00
Felipe Pena e37b16bbd6 - Replaced 'zend_hash_find' to 'zend_hash_quick_find' on zend_hash_compare() function 2010-05-03 16:36:04 +00:00
Ilia Alshanetsky c3d73d417a - Fixed a possible stack exaustion inside fnmatch(). Reporeted by Stefan Esser 2010-05-02 19:34:21 +00:00
Felipe Pena dd3a994c75 - Fixed bug #51719 (typo in function prototype) 2010-05-01 18:54:49 +00:00
Raphael Geissert 9fda15e2ba Fix another typo s/exlcusive/exclusive 2010-05-01 18:30:38 +00:00
Raphael Geissert f4ee6c0a8e Fix typos s/connnection/connection 2010-05-01 18:27:42 +00:00
Derick Rethans e7fb6837b4 - Updated to version 2010.9 (2010i) 2010-04-28 23:03:36 +00:00
Pierre Joye 7a3d3323b9 - - Fixed #51128, imagefill() doesn't work with large images 2010-04-28 14:35:42 +00:00
Ilia Alshanetsky 5fa3f0b849 Fixed a possible arbitrary memory access inside sqlite extension. Reported by Mateusz Kocielski. 2010-04-28 12:10:10 +00:00
Pierre Joye 45c13817be - Fix #51671, imagefill does not work correctly for small images 2010-04-28 08:23:44 +00:00
Pierre Joye da97b79aa6 - WS 2010-04-28 08:04:52 +00:00
Etienne Kneuss 6edecbf5d9 Fix #51374 (Wrongly initialized object properties) 2010-04-27 05:58:39 +00:00
Pierrick Charron 3f159fb7d8 Fixed bug #51670 getColumnMeta causes segfault when re-executing query after calling nextRowset 2010-04-27 05:56:56 +00:00
Etienne Kneuss e9237c98d7 Merge fix for #51532 2010-04-27 05:03:17 +00:00
Etienne Kneuss a3e9455945 Fix #49723 (Skip seek when unnecessary) 2010-04-27 04:58:44 +00:00
Etienne Kneuss 10de8803f7 Fix #49723 (Skip seek when unnecessary) 2010-04-27 04:57:48 +00:00
Ilia Alshanetsky a1db561d6b Fixed handling of session variable serialization on certain prefix characters. Reported by Stefan Esser 2010-04-26 18:35:54 +00:00
Felipe Pena 7248900b87 - Fixed memory leak 2010-04-24 16:59:09 +00:00
Felipe Pena 36bc835bce - Fixed compiler warnings 2010-04-23 13:32:03 +00:00
Pierre Joye c3484056ed - Bug #51629, CURLOPT_FOLLOWLOCATION error message is misleading 2010-04-22 11:49:10 +00:00
Pierre Joye 033d28b5d5 - Bug #51629, CURLOPT_FOLLOWLOCATION error message is misleading 2010-04-22 08:58:07 +00:00
Adam Harvey a3de8acb21 Fix for bug #51604 (newline in end of header is shown in start of message).
Patch by Daniel Egeberg.
2010-04-22 02:22:49 +00:00
Felipe Pena 8aa47cc57d - Fixed bug #51562 (query timeout in mssql can not be changed per query)
Patch by: ejsmont dot artur at gmail dot com
2010-04-21 14:19:27 +00:00
Felipe Pena f45c8ec761 - Fix mem. leak 2010-04-21 12:52:24 +00:00
Felipe Pena b678abf579 - Fixed bug #51617 (PDO PGSQL still broken against PostGreSQL < 7.4)
# Just in this branch, as config.m4 in the 5_3 branch states that 7.4+ is required
2010-04-21 01:18:19 +00:00
Felipe Pena 08a540afef - Improve test 2010-04-20 16:45:46 +00:00
Felipe Pena 247c85bbb6 - Fixed bug #51615 (PHP crash with wrong HTML in SimpleXML) 2010-04-20 16:24:21 +00:00
Felipe Pena 4934e2f072 - Fixed bug #51607 (pg_copy_from does not allow schema in the tablename argument)
Patch by: cbandy at jbandy dot com
2010-04-20 15:59:01 +00:00
Felipe Pena c4fa1da07a - Fixed bug #51609 (pg_copy_to: Invalid results when using fourth parameter) 2010-04-20 14:11:53 +00:00
Felipe Pena d150a2a0b1 - Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string literal)
Patch by: cbandy at jbandy dot com
2010-04-20 11:49:23 +00:00
Adam Harvey 4b039d65ed Added explanatory comments to filter_input and filter_input_array to document
why some code that looks intuitively wrong is actually correct. Related to
bug #51344 (FILTER_NULL_ON_FAILURE flag automatically set in filter_input()
functions).
2010-04-20 04:31:11 +00:00
Pierre Joye ebba322d54 - pdo::begintransaction entry 2010-04-12 19:56:57 +00:00
Felipe Pena 2c6cdb410f - Fixed test 2010-04-04 17:39:26 +00:00
Felipe Pena b0c99eedf7 - Fix tests 2010-04-04 17:21:27 +00:00
Felipe Pena 00ed3f7ca6 - Fixed tests 2010-04-03 16:21:15 +00:00
Felipe Pena 91690a13e0 - Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection) 2010-04-02 21:44:09 +00:00
Rasmus Lerdorf 17542db25f Fix tests 2010-04-02 18:27:48 +00:00
Rasmus Lerdorf 63bc90a304 Update the FILTER_VALIDATE_EMAIL filter to fix bug #49576 2010-04-02 17:56:37 +00:00
Ilia Alshanetsky 4ba90d0807 On beginTransaction() reset error state 2010-04-01 12:08:55 +00:00
Pierre Joye 8fb5bf5405 - add it to 5.2 too, cannot hurt and will spare some work later with pcre&co 2010-04-01 10:52:28 +00:00
Pierre Joye d3a09a2fee - fix build 2010-04-01 10:38:21 +00:00
Rasmus Lerdorf 61e72d1a40 Fix FILTER_VALIDATE_URL - Host names can't start with '.' or '-' 2010-03-31 23:56:30 +00:00
Johannes Schlüter 1bc32d17f2 It's 2010 already 2010-03-30 21:09:07 +00:00
Derick Rethans edd382fe9f - Updated to version 2010.7 (2010g) 2010-03-29 17:22:53 +00:00
Ilia Alshanetsky b26e261e3c Upgraded bundled PCRE to version 8.02. 2010-03-29 11:58:06 +00:00
Adam Harvey 82d44802be Backported the fix for bug #51393 (DateTime::createFromFormat() fails if format
string contains timezone) to PHP_5_2 per discussion with Derick.
2010-03-26 10:12:43 +00:00
Takeshi Abe c358dff36f Fixed bug #51263 (imagettftext and rotated text uses wrong baseline) 2010-03-24 04:12:19 +00:00
Ilia Alshanetsky 13c05cf83c Added test for bug #51338 2010-03-23 11:51:38 +00:00
Ilia Alshanetsky 7c3ca34410 Fixed bug #51338 (URL-Rewriter is still enabled if use_only_cookies is on). 2010-03-22 12:16:45 +00:00
Felipe Pena a440b82b03 - BFN 2010-03-18 22:40:29 +00:00
Andrei Zmievski 5bbe0ee078 I am sorry I tried fixing PHP without extensive discussion on the mailing list.
I am sorry I tried fixing PHP without extensive discussion on the mailing list.
I am sorry I tried fixing PHP without extensive discussion on the mailing list.

Hope all the relevant parties are satisfied.
2010-03-18 22:37:25 +00:00
Felipe Pena fed2532180 Revert 290786: Fixed bug #49521 (PDO fetchObject sets values before calling constructor) 2010-03-18 22:07:51 +00:00
Andrei Zmievski 8316d437fa Fix a few problems with large (2G-4G) file uploads. Added
--enable-large-uploads-fix switch because one change was in SAPI.h structure.
2010-03-18 21:07:38 +00:00
Moriyoshi Koizumi 78e7cf04ca - Fix win32 build. (notified by Rob. Thanks) 2010-03-15 14:19:51 +00:00
Ilia Alshanetsky e27e18d6cd news update 2010-03-15 11:24:36 +00:00
Felipe Pena a630164441 - Fix mem. leak 2010-03-13 20:26:51 +00:00
Raphael Geissert 7822b323b6 Fix CVE-2010-0397: null pointer dereference when processing invalid XML-RPC
requests (bug #51288)
2010-03-13 18:40:29 +00:00
Moriyoshi Koizumi e2cd0ae9fd - Revert accidental commit. 2010-03-12 16:23:18 +00:00
Moriyoshi Koizumi fc9dbca404 - Forgot to commit this patch. Sorry. 2010-03-12 16:19:25 +00:00
Adam Harvey 3be951ae89 Fixed bug #51269 (zlib.output_compression Overwrites Vary Header). 2010-03-11 06:20:22 +00:00
Raphael Geissert c15857413c Properly skip tests that require the bundled gd lib when the external is used 2010-03-11 05:49:50 +00:00
Christopher Jones dc4388d750 Mask name of older DB4 versions 2010-03-09 18:06:20 +00:00
Ilia Alshanetsky 6c96fd1f2f Fixed test (was already fixed in 5.3+) 2010-03-09 12:52:32 +00:00
Felipe Pena cd70c00317 - Fixed bug #51237 (milter SAPI crash on startup)
patch by: igmar at palsenberg dot com
2010-03-08 23:29:46 +00:00
Felipe Pena 14488c2fd7 - Fix php-milter sample usage (-r option doesn't exists here) 2010-03-08 22:58:31 +00:00
Derick Rethans 37cfff0b7e - Updated to version 2010.5 (2010e) 2010-03-08 20:08:51 +00:00
Kalle Sommer Nielsen cb95f062fb Rename the HAVE_LIBICONV_IN_LIBICONV macro to ICONV_ALIASED_LIBICONV, making it less cryptic 2010-03-08 15:51:08 +00:00
William Martin 3d5135dad6 Add some bcmath tests 2010-03-08 15:16:51 +00:00
Kalle Sommer Nielsen 757183990d Fix linking of iconv on Windows 2010-03-08 14:04:35 +00:00
Ilia Alshanetsky b0f7d1c9cb Fixed bug #51213 (pdo_mssql is trimming value of the money column). 2010-03-08 12:39:44 +00:00
Derick Rethans 1a57308c9d - Fixed bug #46111 (Some timezone identifiers can not be parsed). 2010-03-07 19:18:06 +00:00
Derick Rethans cdae64c30a - Re-generate mapping files, but now with BC zones as well.
#- Fixes the test case for bug #17988 that used a few of those.
2010-03-07 19:13:19 +00:00
Derick Rethans d18dc7bb20 - Fixed bug #48902 (Timezone database fallback map is outdated). 2010-03-07 18:21:23 +00:00
Ilia Alshanetsky 653e2ad8eb semantics 2010-03-07 15:33:46 +00:00
Felipe Pena 7043a8aace - Fixed bug #50383 (Exceptions thrown in __call / __callStatic do not include file and line in trace) 2010-03-07 02:17:11 +00:00
Felipe Pena 20a81f7c08 - Fixed tests 2010-03-06 23:58:35 +00:00
Raphael Geissert 865520d872 Add NEWS entries for filter overflow fix 2010-03-06 20:02:25 +00:00
Raphael Geissert 7d4660d7a4 Detect overflows before they occur in the filter extension (bug #51023)
Thanks to Sean Finney for the patch
2010-03-06 18:54:55 +00:00
Derick Rethans fc2d11943e - Fixed bug #51096 ('last day' and 'first day' are handled incorrectly when
parsing date strings).
- For 5.2 I just added the test case minus new 5.3 additions.
2010-03-06 16:04:47 +00:00
Moriyoshi Koizumi 3d8172d4a9 - Fixed bug #49267 (linking fails for iconv) 2010-03-05 09:12:13 +00:00
Christopher Jones 7f771e2066 Fixed bug #51086 (DBA DB4 doesn't work with Berkeley DB 4.8) 2010-03-05 06:45:28 +00:00
Christopher Jones 8de3a80b83 Auto detect recent versions of Berkeley DB4 2010-03-05 05:23:01 +00:00
Christopher Jones a00b12f3d5 DBA tests: cleanup and sycn. Add new Berkeley DB 4 tests 2010-03-05 00:23:26 +00:00
Ilia Alshanetsky a4043f2ef5 Fixed bug #51190 (ftp_put() returns false when transfer was successful). 2010-03-04 12:52:58 +00:00
Rasmus Lerdorf 03a6cf9503 Fix test 2010-03-03 18:19:35 +00:00
Ilia Alshanetsky 39fd01e3b5 BFN 2010-03-03 12:43:00 +00:00
Adam Harvey 8acc64a336 Fix for bug #51192 (FILTER_VALIDATE_URL will invalidate a hostname that includes '-'). Original patch by solar@azrael.ws. 2010-03-03 09:25:50 +00:00
Hannes Magnusson 52b7fc3586 - The ctor requires both arguments
- Sync/fix ctor and export arguments to 5_2
2010-03-02 22:16:24 +00:00
Christopher Jones 31686e451d make portable 2010-03-02 17:00:18 +00:00
William Martin 277de95d05 Added SKIP sections in case extension isn't enabled 2010-03-02 13:21:25 +00:00
Ilia Alshanetsky 79c7a6f8b2 Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when an invalid option is provided) 2010-03-02 12:54:23 +00:00
Rasmus Lerdorf 626e20af3b Fix bug #43314
Assume worst case all-encoded case here
2010-03-01 23:49:01 +00:00
Christopher Jones c21a9f21bb Improve basic code coverage 2010-03-01 20:33:18 +00:00
Derick Rethans 26b2703407 - Updated to version 2010.3 (2010c) 2010-03-01 14:59:24 +00:00
Raphael Geissert 685919b127 Add some sysvmsg coverage tests 2010-03-01 01:59:14 +00:00
Moriyoshi Koizumi 58a4eead20 - Merge from upstream (note: this is no behavioral change, so need not to be
merged to 5.3.2 branch)
2010-02-28 09:33:05 +00:00
Moriyoshi Koizumi bc803a5736 - Whitespaces. 2010-02-28 07:49:36 +00:00
Adam Harvey 69ed41e3c5 Fix for bug #23229 (syslog function truncates messages): remove the hard-coded
500 character error message limit imposed when using error_log=syslog.
2010-02-26 18:01:03 +00:00
Ilia Alshanetsky aae06676ae Back to dev 2010-02-24 12:24:58 +00:00
325 changed files with 22431 additions and 12728 deletions

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
--------------------------------------------------------------------
The PHP License, version 3.01
Copyright (c) 1999 - 2006 The PHP Group. All rights reserved.
Copyright (c) 1999 - 2010 The PHP Group. All rights reserved.
--------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
+3 -18
View File
@@ -5,24 +5,7 @@
lcov: lcov-html
lcov-test: all
@echo "Running test suite"
@find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f
-@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
NO_INTERACTION=1 \
TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
NO_INTERACTION=1 \
TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
TEST_PHP_SRCDIR=$(top_srcdir) \
CC="$(CC)" \
$(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
else \
echo "ERROR: Cannot run tests without CLI sapi."; \
fi
lcov-test: lcov-clean-data test
php_lcov.info: lcov-test
@echo "Generating data for $@"
@@ -74,3 +57,5 @@ lcov-clean:
rm -rf lcov_data/
rm -rf lcov_html/
lcov-clean-data:
@find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f
+170 -1
View File
@@ -1,5 +1,174 @@
PHP NEWS
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
06 Jan 2010, PHP 5.2.17
- Fixed Bug #53632 (infinite loop with x87 fpu). (CVE-2010-4645) (Scott,
Rasmus)
16 Dec 2010, PHP 5.2.16
- Fixed bug #53517 (segfault in pgsql_stmt_execute() when postgres is down).
(gyp at balabit dot hu)
- Fixed bug #53516 (Regression in open_basedir handling). (Ilia)
09 Dec 2010, PHP 5.2.15
- Fixed extract() to do not overwrite $GLOBALS and $this when using
EXTR_OVERWRITE. (jorto at redhat dot com)
- Fixed crash in zip extract method (possible CWE-170).
(Maksymilian Arciemowicz, Pierre)
- Fixed a possible double free in imap extension (Identified by Mateusz
Kocielski). (CVE-2010-4150). (Ilia)
- Fixed possible flaw in open_basedir (CVE-2010-3436). (Pierre)
- Fixed possible crash in mssql_fetch_batch(). (Kalle)
- Fixed NULL pointer dereference in ZipArchive::getArchiveComment.
(CVE-2010-3709). (Maksymilian Arciemowicz)
- Fixed bug #53492 (fix crash if anti-aliasing steps are invalid). (Pierre)
- Fixed bug #53323 (pdo_firebird getAttribute() crash).
(preeves at ibphoenix dot com)
- Fixed bug #52929 (Segfault in filter_var with FILTER_VALIDATE_EMAIL with
large amount of data). (CVE-2010-3709). (Adam)
- Fixed bug #52879 (Objects unreferenced in __get, __set, __isset or __unset
can be freed too early). (mail_ben_schmidt at yahoo dot com dot au, Dmitry)
- Fixed bug #52772 (var_dump() doesn't check for the existence of
get_class_name before calling it). (Kalle, Gustavo)
- Fixed bug #52546 (pdo_dblib segmentation fault when iterating MONEY values).
(Felipe, Adam)
- Fixed bug #52436 (Compile error if systems do not have stdint.h)
(Sriram Natarajan)
- Fixed bug #52390 (mysqli_report() should be per-request setting). (Kalle)
- Fixed bug #51008 (Zend/tests/bug45877.phpt fails). (Dmitry)
- Fixed bug #47643 (array_diff() takes over 3000 times longer than php 5.2.4).
(Felipe)
- Fixed bug #44248 (RFC2616 transgression while HTTPS request through proxy
with SoapClient object). (Dmitry)
22 Jul 2010, PHP 5.2.14
- Reverted bug fix #49521 (PDO fetchObject sets values before calling
constructor). (Felipe)
- Updated timezone database to version 2010.5. (Derick)
- Upgraded bundled PCRE to version 8.02. (Ilia)
- Rewrote var_export() to use smart_str rather than output buffering, prevents
data disclosure if a fatal error occurs (CVE-2010-2531). (Scott)
- Fixed a possible interruption array leak in strrchr(). Reported by
Péter Veres. (CVE-2010-2484) (Felipe)
- Fixed a possible interruption array leak in strchr(), strstr(), substr(),
chunk_split(), strtok(), addcslashes(), str_repeat(), trim(). (Felipe)
- Fixed a possible memory corruption in substr_replace() (Dmitry)
- Fixed SplObjectStorage unserialization problems (CVE-2010-2225). (Stas)
- Fixed a possible stack exaustion inside fnmatch(). Reporeted by Stefan
Esser (Ilia)
- Reset error state in PDO::beginTransaction() reset error state. (Ilia)
- Fixed a NULL pointer dereference when processing invalid XML-RPC
requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
- Fixed handling of session variable serialization on certain prefix
characters. Reported by Stefan Esser (Ilia)
- Fixed a possible arbitrary memory access inside sqlite extension. Reported
by Mateusz Kocielski. (Ilia)
- Fixed a crash when calling an inexistent method of a class that inherits
PDOStatement if instantiated directly instead of doing by the PDO methods.
(Felipe)
- Fixed bug #52944 (Invalid write on second and subsequent reads with an
inflate filter fed invalid data). (Gustavo)
- Fixed bug #52317 (Segmentation fault when using mail() on a rhel 4.x (only 64
bit)). (Adam)
- Fixed bug #52238 (Crash when an Exception occured in iterator_to_array).
(Johannes)
- Fixed bug #52237 (Crash when passing the reference of the property of a
non-object). (Dmitry)
- Fixed bug #52163 (SplFileObject::fgetss() fails due to parameter that can't
be set). (Felipe)
- Fixed bug #52162 (custom request header variables with numbers are removed).
(Sriram Natarajan)
- Fixed bug #52160 (Invalid E_STRICT redefined constructor error). (Felipe)
- Fixed bug #52061 (memory_limit above 2G). (Felipe)
- Fixed bug #52041 (Memory leak when writing on uninitialized variable returned
from function). (Dmitry)
- Fixed bug #52037 (Concurrent builds fail in install-programs). (seanius at
debian dot org, Kalle)
- Fixed bug #52019 (make lcov doesn't support TESTS variable anymore). (Patrick)
- Fixed bug #52010 (open_basedir restrictions mismatch on vacuum command).
(Ilia, Felipe)
- Fixed bug #51943 (AIX: Several files are out of ANSI spec). (Kalle,
coreystup at gmail dot com)
- Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with
constant array). (Felipe)
- Fixed bug #51905 (ReflectionParameter fails if default value is an array
with an access to self::). (Felipe)
- Fixed bug #51822 (Segfault with strange __destruct() for static class
variables). (Dmitry)
- Fixed bug #51671 (imagefill does not work correctly for small images).
(Pierre)
- Fixed bug #51670 (getColumnMeta causes segfault when re-executing query
after calling nextRowset). (Pierrick)
- Fixed bug #51629 (CURLOPT_FOLLOWLOCATION error message is misleading).
(Pierre)
- Fixed bug #51617 (PDO PGSQL still broken against PostGreSQL < 7.4).
(Felipe, wdierkes at 5dollarwhitebox dot org)
- Fixed bug #51615 (PHP crash with wrong HTML in SimpleXML). (Felipe)
- Fixed bug #51609 (pg_copy_to: Invalid results when using fourth parameter).
(Felipe)
- Fixed bug #51608 (pg_copy_to: WARNING: nonstandard use of \\ in a string
literal). (cbandy at jbandy dot com)
- Fixed bug #51607 (pg_copy_from does not allow schema in the tablename
argument). (cbandy at jbandy dot com)
- Fixed bug #51604 (newline in end of header is shown in start of message).
(Daniel Egeberg)
- Fixed bug #51562 (query timeout in mssql can not be changed per query).
(ejsmont dot artur at gmail dot com)
- Fixed bug #51552 (debug_backtrace() causes segmentation fault and/or memory
issues). (Dmitry)
- Fixed bug #51532 (Wrong prototype for SplFileObject::fscanf()). (Etienne)
- Fixed bug #51445 (var_dump() invalid/slow *RECURSION* detection). (Felipe)
- Fixed bug #51393 (DateTime::createFromFormat() fails if format string contains
timezone). (Adam)
- Fixed bug #51374 (Wrongly initialized object properties). (Etienne)
- Fixed bug #51338 (URL-Rewriter is still enabled if use_only_cookies is
on). (Ilia, j dot jeising at gmail dot com)
- Fixed bug #51273 (Faultstring property does not exist when the faultstring is
empty) (Ilia, dennis at transip dot nl)
- Fixed bug #51269 (zlib.output_compression Overwrites Vary Header). (Adam)
- Fixed bug #51263 (imagettftext and rotated text uses wrong baseline)
(cschneid at cschneid dot com, Takeshi Abe)
- Fixed bug #51237 (milter SAPI crash on startup). (igmar at palsenberg dot com)
- Fixed bug #51213 (pdo_mssql is trimming value of the money column). (Ilia,
alexr at oplot dot com)
- Fixed bug #51192 (FILTER_VALIDATE_URL will invalidate a hostname that
includes '-'). (Adam, solar at azrael dot ws).
- Fixed bug #51190 (ftp_put() returns false when transfer was successful).
(Ilia)
- Fixed bug #51183 (ext/date/php_date.c fails to compile with Sun Studio).
(Sriram Natarajan)
- Fixed bug #51171 (curl_setopt() doesn't output any errors or warnings when
an invalid option is provided). (Ilia)
- Fixed bug #51128 (imagefill() doesn't work with large images). (Pierre)
- Fixed bug #51086 (DBA DB4 doesn't work with Berkeley DB 4.8). (Chris Jones)
- Fixed bug #51062 (DBA DB4 uses mismatched headers and libraries). (Chris
Jones)
- Fixed bug #51023 (filter doesn't detect int overflows with GCC 4.4).
(Raphael Geissert)
- Fixed bug #50762 (in WSDL mode Soap Header handler function only being called
if defined in WSDL). (mephius at gmail dot com)
- Fixed bug #50698 (SoapClient should handle wsdls with some incompatiable
endpoints). (Justin Dearing)
- Fixed bug #50383 (Exceptions thrown in __call() / __callStatic() do not
include file and line in trace). (Felipe)
- Fixed bug #49730 (Firebird - new PDO() returns NULL). (Felipe)
- Fixed bug #49723 (LimitIterator with empty SeekableIterator). (Etienne)
- Fixed bug #49687 (utf8_decode vulnerabilities and deficiencies in the number
of reported malformed sequences). (CVE-2010-3870) (Gustavo)
- Fixed bug #49576 (FILTER_VALIDATE_EMAIL filter needs updating) (Rasmus)
- Fixed bug #49320 (PDO returns null when SQLite connection fails). (Felipe)
- Fixed bug #49267 (Linking fails for iconv). (Moriyosh)
- Fixed bug #48601 (xpath() returns FALSE for legitimate query). (Rob)
- Fixed bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
(Adam, patch from hiroaki dot kawai at gmail dot com).
- Fixed bug #43314 (iconv_mime_encode(), broken Q scheme). (Rasmus)
- Fixed bug #33210 (getimagesize() fails to detect width/height on certain
JPEGs). (Ilia)
- Fixed bug #23229 (syslog() truncates messages). (Adam)
25 Feb 2010, PHP 5.2.13
- Updated timezone database to version 2010.2. (Derick)
- Upgraded bundled PCRE to version 7.9. (Ilia)
+5 -19
View File
@@ -12,30 +12,16 @@ var_dump($a);
$a->x0->y1 = "ok\n";
echo $a->x0;
?>
--EXPECT--
object(stdClass)#1 (1) {
--EXPECTF--
object(stdClass)#%d (1) {
["x0"]=>
&object(stdClass)#2 (3) {
&object(stdClass)#%d (3) {
["y0"]=>
string(1) "b"
["y1"]=>
&object(stdClass)#2 (3) {
["y0"]=>
string(1) "b"
["y1"]=>
*RECURSION*
["y2"]=>
*RECURSION*
}
*RECURSION*
["y2"]=>
&object(stdClass)#2 (3) {
["y0"]=>
string(1) "b"
["y1"]=>
*RECURSION*
["y2"]=>
*RECURSION*
}
*RECURSION*
}
}
ok
+4 -2
View File
@@ -30,7 +30,9 @@ if (defined("pass3")) {
set_error_handler('errorHandler');
define("pass2", 1);
include(__FILE__);
print "ok\n";
}
?>
--EXPECTF--
Error: Redefining already defined constructor for class TestClass (%sbug35634.php:12)
--EXPECT--
ok
+2 -2
View File
@@ -1,7 +1,7 @@
--TEST--
Bug #45877 (Array key '2147483647' left as string)
--INI--
precision=20
precision=16
--FILE--
<?php
$keys = array(PHP_INT_MAX,
@@ -18,6 +18,6 @@ array(3) {
int(1)
[-%d8]=>
int(1)
["%d8"]=>
["%s"]=>
int(1)
}
+71
View File
@@ -0,0 +1,71 @@
--TEST--
Bug #50383 (Exceptions thrown in __call / __callStatic do not include file and line in trace)
--FILE--
<?php
class myClass {
public function __call($method, $args) {
throw new Exception("Missing method '$method'\n");
}
}
function thrower2() {
$x = new myClass;
$x->foo();
}
try {
thrower2();
} catch (Exception $e) {
print $e->getMessage();
print_r($e->getTrace());
}
?>
--EXPECTF--
Missing method 'foo'
Array
(
[0] => Array
(
[file] => %s
[line] => 11
[function] => __call
[class] => myClass
[type] => ->
[args] => Array
(
[0] => foo
[1] => Array
(
)
)
)
[1] => Array
(
[file] => %s
[line] => 11
[function] => foo
[class] => myClass
[type] => ->
[args] => Array
(
)
)
[2] => Array
(
[file] => %s
[line] => 15
[function] => thrower2
[args] => Array
(
)
)
)
+40
View File
@@ -0,0 +1,40 @@
--TEST--
Bug #51822 (Segfault with strange __destruct() for static class variables)
--FILE--
<?php
class DestructableObject
{
public function __destruct()
{
echo "2\n";
}
}
class DestructorCreator
{
public function __destruct()
{
$this->test = new DestructableObject;
echo "1\n";
}
}
class Test
{
public static $mystatic;
}
// Uncomment this to avoid segfault
//Test::$mystatic = new DestructorCreator();
$x = new Test();
if (!isset(Test::$mystatic))
Test::$mystatic = new DestructorCreator();
echo "bla\n";
?>
--EXPECT--
bla
1
2
+50
View File
@@ -0,0 +1,50 @@
--TEST--
Bug #52041 (Memory leak when writing on uninitialized variable returned from function)
--FILE--
<?php
function foo() {
return $x;
}
foo()->a = 1;
foo()->a->b = 2;
foo()->a++;
foo()->a->b++;
foo()->a += 2;
foo()->a->b += 2;
//foo()[0] = 1;
//foo()[0][0] = 2;
//foo()[0]++;
//foo()[0][0]++;
//foo()[0] += 2;
//foo()[0][0] += 2;
var_dump(foo());
?>
--EXPECTF--
Notice: Undefined variable: x in %sbug52041.php on line 3
Strict Standards: Creating default object from empty value in %sbug52041.php on line 6
Notice: Undefined variable: x in %sbug52041.php on line 3
Strict Standards: Creating default object from empty value in %sbug52041.php on line 7
Notice: Undefined variable: x in %sbug52041.php on line 3
Strict Standards: Creating default object from empty value in %sbug52041.php on line 8
Notice: Undefined variable: x in %sbug52041.php on line 3
Strict Standards: Creating default object from empty value in %sbug52041.php on line 9
Notice: Undefined variable: x in %sbug52041.php on line 3
Strict Standards: Creating default object from empty value in %sbug52041.php on line 10
Notice: Undefined variable: x in %sbug52041.php on line 3
Strict Standards: Creating default object from empty value in %sbug52041.php on line 11
Notice: Undefined variable: x in %sbug52041.php on line 3
NULL
+34
View File
@@ -0,0 +1,34 @@
--TEST--
Bug #52160 (Invalid E_STRICT redefined constructor error)
--FILE--
<?php
class bar {
function __construct() { }
static function bar() {
var_dump(1);
}
}
bar::bar();
class foo {
static function foo() {
var_dump(2);
}
function __construct() { }
}
foo::foo();
class baz {
static function baz() {
var_dump(3);
}
}
?>
--EXPECTF--
Strict Standards: Redefining already defined constructor for class foo in %s on line %d
Fatal error: Constructor baz::baz() cannot be static in %s on line %d
+10
View File
@@ -0,0 +1,10 @@
--TEST--
Bug #52237 (Crash when passing the reference of the property of a non-object)
--FILE--
<?php
$data = 'test';
preg_match('//', '', $data->info);
var_dump($data);
?>
--EXPECT--
string(4) "test"
+16
View File
@@ -0,0 +1,16 @@
--TEST--
Bug #52879 (Objects unreferenced in __get, __set, __isset or __unset can be freed too early)
--FILE--
<?php
class MyClass {
public $myRef;
public function __set($property,$value) {
$this->myRef = $value;
}
}
$myGlobal=new MyClass($myGlobal);
$myGlobal->myRef=&$myGlobal;
$myGlobal->myNonExistentProperty="ok\n";
echo $myGlobal;
--EXPECT--
ok
+10
View File
@@ -0,0 +1,10 @@
--TEST--
zend_strtod() hangs with 2.2250738585072011e-308
--FILE--
<?php
$d = 2.2250738585072011e-308;
echo "Done\n";
?>
--EXPECTF--
Done
+6
View File
@@ -1,5 +1,11 @@
--TEST--
Testing declare statement with several type values
--SKIPIF--
<?php
if (in_array("detect_unicode", array_keys(ini_get_all()))) {
die("skip");
}
?>
--FILE--
<?php
+1 -2
View File
@@ -14,6 +14,5 @@ class test {
echo "Done\n";
?>
--EXPECTF--
Strict Standards: Redefining already defined constructor for class test in %s on line %d
--EXPECT--
Done
+1 -1
View File
@@ -952,7 +952,7 @@ ZEND_API int _object_and_properties_init(zval *arg, zend_class_entry *class_type
} else {
ALLOC_HASHTABLE_REL(object->properties);
zend_hash_init(object->properties, zend_hash_num_elements(&class_type->default_properties), NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
}
} else {
Z_OBJVAL_P(arg) = class_type->create_object(class_type TSRMLS_CC);
+1 -1
View File
@@ -1090,7 +1090,7 @@ ZEND_API zend_mm_heap *zend_mm_startup_ex(const zend_mm_mem_handlers *handlers,
mm_heap->large_free_buckets[i]->parent = &mm_heap->large_free_buckets[i];
}
}
mm_heap->rest_buckets[0]->next_free_block = mm_heap->rest_buckets[1]->prev_free_block = ZEND_MM_REST_BUCKET(mm_heap);
mm_heap->rest_buckets[0] = mm_heap->rest_buckets[1] = ZEND_MM_REST_BUCKET(mm_heap);
free(heap);
heap = mm_heap;
+4 -2
View File
@@ -1148,7 +1148,7 @@ ZEND_FUNCTION(get_included_files)
/* }}} */
/* {{{ proto void trigger_error(string messsage [, int error_type])
/* {{{ proto void trigger_error(string message [, int error_type])
Generates a user-level error/warning/notice message */
ZEND_FUNCTION(trigger_error)
{
@@ -1987,7 +1987,9 @@ ZEND_API void zend_fetch_debug_backtrace(zval *return_value, int skip_last, int
while (prev) {
if (prev->function_state.function &&
prev->function_state.function->common.type != ZEND_USER_FUNCTION) {
prev->function_state.function->common.type != ZEND_USER_FUNCTION &&
!(prev->function_state.function->common.type == ZEND_INTERNAL_FUNCTION &&
(prev->function_state.function->common.fn_flags & ZEND_ACC_CALL_VIA_HANDLER))) {
break;
}
if (prev->op_array) {
+11 -7
View File
@@ -1175,9 +1175,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
/* Improve after RC: cache the lowercase class name */
if ((short_class_name_length == name_len) && (!memcmp(short_class_name, lcname, name_len))) {
if (CG(active_class_entry)->constructor) {
zend_error(E_STRICT, "Redefining already defined constructor for class %s", CG(active_class_entry)->name);
} else {
if (!CG(active_class_entry)->constructor) {
CG(active_class_entry)->constructor = (zend_function *) CG(active_op_array);
}
} else if ((name_len == sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)-1) && (!memcmp(lcname, ZEND_CONSTRUCTOR_FUNC_NAME, sizeof(ZEND_CONSTRUCTOR_FUNC_NAME)))) {
@@ -2011,13 +2009,16 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe, zend_fu
{
zend_uint i;
/* If it's a user function then arg_info == NULL means we don't have any parameters but we still need to do the arg number checks. We are only willing to ignore this for internal functions because extensions don't always define arg_info. */
/* If it's a user function then arg_info == NULL means we don't have any parameters but
* we still need to do the arg number checks. We are only willing to ignore this for internal
* functions because extensions don't always define arg_info.
*/
if (!proto || (!proto->common.arg_info && proto->common.type != ZEND_USER_FUNCTION)) {
return 1;
}
/* Checks for constructors only if they are declared in an interface */
if ((fe->common.fn_flags & ZEND_ACC_CTOR) && !(proto->common.scope->ce_flags & ZEND_ACC_INTERFACE)) {
if ((fe->common.fn_flags & ZEND_ACC_CTOR) && (proto->common.scope->ce_flags & ZEND_ACC_INTERFACE) == 0) {
return 1;
}
@@ -2297,6 +2298,9 @@ static int inherit_static_prop(zval **p, int num_args, va_list args, zend_hash_k
return ZEND_HASH_APPLY_KEEP;
}
#define zval_property_ctor(parent_ce, ce) \
((copy_ctor_func_t) (((parent_ce)->type != (ce)->type) ? zval_shared_property_ctor : zval_add_ref))
ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent_ce TSRMLS_DC)
{
if ((ce->ce_flags & ZEND_ACC_INTERFACE)
@@ -2312,7 +2316,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
zend_do_inherit_interfaces(ce, parent_ce TSRMLS_CC);
/* Inherit properties */
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, (void (*)(void *)) zval_add_ref, NULL, sizeof(zval *), 0);
zend_hash_merge(&ce->default_properties, &parent_ce->default_properties, zval_property_ctor(parent_ce, ce), NULL, sizeof(zval *), 0);
if (parent_ce->type != ce->type) {
/* User class extends internal class */
zend_update_class_constants(parent_ce TSRMLS_CC);
@@ -2322,7 +2326,7 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
}
zend_hash_merge_ex(&ce->properties_info, &parent_ce->properties_info, (copy_ctor_func_t) (ce->type & ZEND_INTERNAL_CLASS ? zend_duplicate_property_info_internal : zend_duplicate_property_info), sizeof(zend_property_info), (merge_checker_func_t) do_inherit_property_access_check, ce);
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, (void (*)(void *)) zval_add_ref, NULL, sizeof(zval *), 0);
zend_hash_merge(&ce->constants_table, &parent_ce->constants_table, zval_property_ctor(parent_ce, ce), NULL, sizeof(zval *), 0);
zend_hash_merge_ex(&ce->function_table, &parent_ce->function_table, (copy_ctor_func_t) do_inherit_method, sizeof(zend_function), (merge_checker_func_t) do_inherit_method_check, ce);
do_inherit_parent_constructor(ce);
+1 -1
View File
@@ -84,7 +84,7 @@ static zend_object_value zend_default_exception_new_ex(zend_class_entry *class_t
ALLOC_HASHTABLE(object->properties);
zend_hash_init(object->properties, 0, NULL, ZVAL_PTR_DTOR, 0);
zend_hash_copy(object->properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *));
zend_hash_copy(object->properties, &class_type->default_properties, zval_copy_property_ctor(class_type), (void *) &tmp, sizeof(zval *));
ALLOC_ZVAL(trace);
trace->is_ref = 0;
+2
View File
@@ -140,6 +140,8 @@ static inline int i_zend_is_true(zval *op)
}
ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC);
ZEND_API int zval_update_constant_inline_change(zval **pp, void *arg TSRMLS_DC);
ZEND_API int zval_update_constant_no_inline_change(zval **pp, void *arg TSRMLS_DC);
ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *scope TSRMLS_DC);
/* dedicated Zend executor functions - do not use! */
+11 -1
View File
@@ -584,12 +584,22 @@ ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry *sco
zend_hash_move_forward(Z_ARRVAL_P(p));
zval_dtor(&const_value);
}
zend_hash_apply_with_argument(Z_ARRVAL_P(p), (apply_func_arg_t) zval_update_constant, (void *) 1 TSRMLS_CC);
zend_hash_apply_with_argument(Z_ARRVAL_P(p), (apply_func_arg_t) zval_update_constant_inline_change, (void *) scope TSRMLS_CC);
zend_hash_internal_pointer_reset(Z_ARRVAL_P(p));
}
return 0;
}
ZEND_API int zval_update_constant_inline_change(zval **pp, void *scope TSRMLS_DC)
{
return zval_update_constant_ex(pp, (void*)1, scope TSRMLS_CC);
}
ZEND_API int zval_update_constant_no_inline_change(zval **pp, void *scope TSRMLS_DC)
{
return zval_update_constant_ex(pp, (void*)0, scope TSRMLS_CC);
}
ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
{
return zval_update_constant_ex(pp, arg, NULL TSRMLS_CC);
+1 -1
View File
@@ -1379,7 +1379,7 @@ ZEND_API int zend_hash_compare(HashTable *ht1, HashTable *ht2, compare_func_t co
return 1;
}
} else { /* string index */
if (zend_hash_find(ht2, p1->arKey, p1->nKeyLength, &pData2)==FAILURE) {
if (zend_hash_quick_find(ht2, p1->arKey, p1->nKeyLength, p1->h, &pData2)==FAILURE) {
HASH_UNPROTECT_RECURSION(ht1);
HASH_UNPROTECT_RECURSION(ht2);
return 1;
+4 -4
View File
@@ -306,7 +306,7 @@ END_EXTERN_C()
} \
if (*tmp >= '0' && *tmp <= '9') { /* possibly a numeric index */ \
const char *end = key + length - 1; \
long idx; \
ulong idx; \
\
if ((*end != '\0') /* not a null terminated string */ \
|| (*tmp == '0' && length > 2) /* numbers with leading zeros */ \
@@ -322,11 +322,11 @@ END_EXTERN_C()
} \
if (tmp == end) { \
if (*key == '-') { \
idx = -idx; \
if (idx > 0) { /* overflow */ \
if (idx-1 > LONG_MAX) { /* overflow */ \
break; \
} \
} else if (idx < 0) { /* overflow */ \
idx = (ulong)(-(long)idx); \
} else if (idx > LONG_MAX) { /* overflow */ \
break; \
} \
return func; \
+13 -4
View File
@@ -329,6 +329,9 @@ zval *zend_std_read_property(zval *object, zval *member, int type TSRMLS_DC)
!guard->in_get) {
/* have getter - try with it! */
ZVAL_ADDREF(object);
if (PZVAL_IS_REF(object)) {
SEPARATE_ZVAL(&object);
}
guard->in_get = 1; /* prevent circular getting */
rv = zend_std_call_getter(object, member TSRMLS_CC);
guard->in_get = 0;
@@ -418,22 +421,22 @@ static void zend_std_write_property(zval *object, zval *member, zval *value TSRM
}
}
} else {
int setter_done = 0;
zend_guard *guard;
if (zobj->ce->__set &&
zend_get_property_guard(zobj, property_info, member, &guard) == SUCCESS &&
!guard->in_set) {
ZVAL_ADDREF(object);
if (PZVAL_IS_REF(object)) {
SEPARATE_ZVAL(&object);
}
guard->in_set = 1; /* prevent circular setting */
if (zend_std_call_setter(object, member, value TSRMLS_CC) != SUCCESS) {
/* for now, just ignore it - __set should take care of warnings, etc. */
}
setter_done = 1;
guard->in_set = 0;
zval_ptr_dtor(&object);
}
if (!setter_done && property_info) {
} else if (property_info) {
zval **foo;
/* if we assign referenced variable, we should separate it */
@@ -611,6 +614,9 @@ static void zend_std_unset_property(zval *object, zval *member TSRMLS_DC)
!guard->in_unset) {
/* have unseter - try with it! */
ZVAL_ADDREF(object);
if (PZVAL_IS_REF(object)) {
SEPARATE_ZVAL(&object);
}
guard->in_unset = 1; /* prevent circular unsetting */
zend_std_call_unsetter(object, member TSRMLS_CC);
guard->in_unset = 0;
@@ -1042,6 +1048,9 @@ static int zend_std_has_property(zval *object, zval *member, int has_set_exists
/* have issetter - try with it! */
ZVAL_ADDREF(object);
if (PZVAL_IS_REF(object)) {
SEPARATE_ZVAL(&object);
}
guard->in_isset = 1; /* prevent circular getting */
rv = zend_std_call_issetter(object, member TSRMLS_CC);
if (rv) {
+2 -2
View File
@@ -156,7 +156,7 @@ static void zval_add_ref_or_clone(zval **p)
(*p)->value.obj = Z_OBJ_HT_PP(p)->clone_obj(orig TSRMLS_CC);
}
} else {
(*p)->refcount++;
zval_shared_property_ctor(p);
}
}
@@ -165,7 +165,7 @@ ZEND_API void zend_objects_clone_members(zend_object *new_object, zend_object_va
if (EG(ze1_compatibility_mode)) {
zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref_or_clone, (void *) NULL /* Not used anymore */, sizeof(zval *));
} else {
zend_hash_copy(new_object->properties, old_object->properties, (copy_ctor_func_t) zval_add_ref, (void *) NULL /* Not used anymore */, sizeof(zval *));
zend_hash_copy(new_object->properties, old_object->properties, zval_copy_property_ctor(old_object->ce), (void *) NULL /* Not used anymore */, sizeof(zval *));
}
if (old_object->ce->clone) {
zval *new_obj;
+4 -1
View File
@@ -157,7 +157,10 @@ ZEND_API int zend_cleanup_class_data(zend_class_entry **pce TSRMLS_DC)
/* Note that only run-time accessed data need to be cleaned up, pre-defined data can
not contain objects and thus are not probelmatic */
zend_hash_apply(&(*pce)->function_table, (apply_func_t) zend_cleanup_function_data_full TSRMLS_CC);
(*pce)->static_members = NULL;
if ((*pce)->static_members) {
zend_hash_clean((*pce)->static_members);
(*pce)->static_members = NULL;
}
} else if (CE_STATIC_MEMBERS(*pce)) {
zend_hash_destroy(CE_STATIC_MEMBERS(*pce));
FREE_HASHTABLE(CE_STATIC_MEMBERS(*pce));
+27
View File
@@ -69,6 +69,33 @@ ZEND_API int zend_atoi(const char *str, int str_len)
return retval;
}
ZEND_API long zend_atol(const char *str, int str_len) /* {{{ */
{
long retval;
if (!str_len) {
str_len = strlen(str);
}
retval = strtol(str, NULL, 0);
if (str_len>0) {
switch (str[str_len-1]) {
case 'g':
case 'G':
retval *= 1024;
/* break intentionally missing */
case 'm':
case 'M':
retval *= 1024;
/* break intentionally missing */
case 'k':
case 'K':
retval *= 1024;
break;
}
}
return retval;
}
/* }}} */
ZEND_API double zend_string_to_double(const char *number, zend_uint length)
{
+1
View File
@@ -303,6 +303,7 @@ ZEND_API void zend_compare_arrays(zval *result, zval *a1, zval *a2 TSRMLS_DC);
ZEND_API void zend_compare_objects(zval *result, zval *o1, zval *o2 TSRMLS_DC);
ZEND_API int zend_atoi(const char *str, int str_len);
ZEND_API long zend_atol(const char *str, int str_len);
ZEND_API void zend_locale_sprintf_double(zval *op ZEND_FILE_LINE_DC);
END_EXTERN_C()
+6 -1
View File
@@ -164,6 +164,7 @@ typedef unsigned long int uint32_t;
#ifdef __vax__
#define VAX
#undef IEEE_LITTLE_ENDIAN
#endif
#if defined(_MSC_VER)
@@ -2030,12 +2031,16 @@ ret1:
return s0;
}
/* F* VC6 */
#if _MSC_VER <= 1300
# pragma optimize( "", off )
#endif
ZEND_API double zend_strtod (CONST char *s00, char **se)
{
int bb2, bb5, bbe, bd2, bd5, bbbits, bs2, c, dsign,
e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
CONST char *s, *s0, *s1;
double aadj, aadj1, adj;
volatile double aadj, aadj1, adj;
volatile _double rv, rv0;
Long L;
ULong y, z;
+12
View File
@@ -150,6 +150,18 @@ ZEND_API int zend_print_variable(zval *var) /* {{{ */
}
/* }}} */
ZEND_API void zval_property_ctor(zval **p) /* {{{ */
{
zval *orig_ptr = *p;
ALLOC_ZVAL(*p);
**p = *orig_ptr;
zval_copy_ctor(*p);
(*p)->refcount = 1;
(*p)->is_ref = 0;
}
/* }}} */
#if ZEND_DEBUG
ZEND_API void _zval_copy_ctor_wrapper(zval *zvalue) /* {{{ */
{
+11
View File
@@ -77,6 +77,17 @@ ZEND_API void _zval_internal_ptr_dtor_wrapper(zval **zvalue);
ZEND_API void zval_add_ref(zval **p);
ZEND_API void zval_property_ctor(zval **);
#ifdef ZTS
# define zval_shared_property_ctor zval_property_ctor
#else
# define zval_shared_property_ctor zval_add_ref
#endif
#define zval_copy_property_ctor(ce) ((copy_ctor_func_t) (((ce)->type == ZEND_INTERNAL_CLASS) ? zval_shared_property_ctor : zval_add_ref))
END_EXTERN_C()
#define ZVAL_DESTRUCTOR (void (*)(void *)) zval_dtor_wrapper
+16 -3
View File
@@ -2192,6 +2192,12 @@ ZEND_VM_C_LABEL(return_by_value):
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
} else if ((OP1_TYPE == IS_CV || OP1_TYPE == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
zval *ret;
ALLOC_INIT_ZVAL(ret);
*EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
retval_ptr->refcount++;
@@ -2372,9 +2378,16 @@ 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);
}
if (OP1_TYPE == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
(*varptr_ptr)->refcount--;
ALLOC_ZVAL(*varptr_ptr);
INIT_ZVAL(**varptr_ptr);
(*varptr_ptr)->refcount = 0;
}
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;
+44 -6
View File
@@ -1809,6 +1809,12 @@ return_by_value:
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
} else if ((IS_CONST == IS_CV || IS_CONST == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
zval *ret;
ALLOC_INIT_ZVAL(ret);
*EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
retval_ptr->refcount++;
@@ -4385,6 +4391,12 @@ return_by_value:
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
} else if ((IS_TMP_VAR == IS_CV || IS_TMP_VAR == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
zval *ret;
ALLOC_INIT_ZVAL(ret);
*EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
retval_ptr->refcount++;
@@ -7435,6 +7447,12 @@ return_by_value:
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
} else if ((IS_VAR == IS_CV || IS_VAR == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
zval *ret;
ALLOC_INIT_ZVAL(ret);
*EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
retval_ptr->refcount++;
@@ -7587,9 +7605,16 @@ 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);
}
if (IS_VAR == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
(*varptr_ptr)->refcount--;
ALLOC_ZVAL(*varptr_ptr);
INIT_ZVAL(**varptr_ptr);
(*varptr_ptr)->refcount = 0;
}
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;
@@ -19865,6 +19890,12 @@ return_by_value:
INIT_PZVAL_COPY(ret, retval_ptr);
zval_copy_ctor(ret);
*EG(return_value_ptr_ptr) = ret;
} else if ((IS_CV == IS_CV || IS_CV == IS_VAR) &&
retval_ptr == &EG(uninitialized_zval)) {
zval *ret;
ALLOC_INIT_ZVAL(ret);
*EG(return_value_ptr_ptr) = ret;
} else {
*EG(return_value_ptr_ptr) = retval_ptr;
retval_ptr->refcount++;
@@ -20017,9 +20048,16 @@ 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);
}
if (IS_CV == IS_VAR && *varptr_ptr == EG(error_zval_ptr)) {
(*varptr_ptr)->refcount--;
ALLOC_ZVAL(*varptr_ptr);
INIT_ZVAL(**varptr_ptr);
(*varptr_ptr)->refcount = 0;
}
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;
+4 -1
View File
@@ -1095,7 +1095,7 @@ ifelse([$5],[],,[else $5])
dnl
dnl PHP_CHECK_SIZEOF(type, cross-value, extra-headers)
dnl
AC_DEFUN(PHP_CHECK_SIZEOF, [
AC_DEFUN([PHP_CHECK_SIZEOF], [
AC_MSG_CHECKING([size of $1])
_PHP_CHECK_SIZEOF($1, $2, $3, [
AC_DEFINE_UNQUOTED([SIZEOF_]translit($1,a-z,A-Z_), [$]php_cv_sizeof_[]$1, [Size of $1])
@@ -2424,6 +2424,7 @@ AC_DEFUN([PHP_SETUP_ICONV], [
echo > ext/iconv/php_have_libiconv.h
echo > ext/iconv/php_have_iconv.h
echo > ext/iconv/php_php_iconv_impl.h
echo > ext/iconv/php_iconv_aliased_libiconv.h
echo > ext/iconv/php_php_iconv_h_path.h
echo > ext/iconv/php_iconv_supports_errno.h
@@ -2471,6 +2472,8 @@ AC_DEFUN([PHP_SETUP_ICONV], [
found_iconv=yes
PHP_DEFINE(HAVE_LIBICONV,1,[ext/iconv])
AC_DEFINE(HAVE_LIBICONV,1,[ ])
PHP_DEFINE([ICONV_ALIASED_LIBICONV],1,[ext/iconv])
AC_DEFINE([ICONV_ALIASED_LIBICONV],1,[iconv() is aliased to libiconv() in -liconv])
], [
PHP_CHECK_LIBRARY($iconv_lib_name, iconv, [
found_iconv=yes
+1 -1
View File
@@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h)
PHP_MAJOR_VERSION=5
PHP_MINOR_VERSION=2
PHP_RELEASE_VERSION=13
PHP_RELEASE_VERSION=17
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`
+12
View File
@@ -0,0 +1,12 @@
--TEST--
bcadd() incorrect argument count
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcadd();
?>
--EXPECTF--
Warning: Wrong parameter count for bcadd() in %s on line %d
+16
View File
@@ -0,0 +1,16 @@
--TEST--
bcadd() with non-integers
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=5
--FILE--
<?php
echo bcadd("2.2", "4.3", "2")."\n";
echo bcadd("2.2", "-7.3", "1")."\n";
echo bcadd("-4.27", "7.3");
?>
--EXPECTF--
6.50
-5.1
3.03000
+16
View File
@@ -0,0 +1,16 @@
--TEST--
bccomp() with non-integers
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bccomp("2.2", "2.2", "2")."\n";
echo bccomp("2.32", "2.2", "2")."\n";
echo bccomp("2.29", "2.3", "2");
?>
--EXPECTF--
0
1
-1
+16
View File
@@ -0,0 +1,16 @@
--TEST--
bccomp() with negative value
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bccomp("-2", "-2")."\n";
echo bccomp("-2", "2", "1")."\n";
echo bccomp("-2.29", "-2.3", "2");
?>
--EXPECTF--
0
-1
1
+12
View File
@@ -0,0 +1,12 @@
--TEST--
bcmod() - mod by 0
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcmod("10", "0");
?>
--EXPECTF--
Warning: bcmod(): Division by zero in %s on line %d
+12
View File
@@ -0,0 +1,12 @@
--TEST--
bcmul() incorrect argument count
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcmul();
?>
--EXPECTF--
Warning: Wrong parameter count for bcmul() in %s on line %d
+12
View File
@@ -0,0 +1,12 @@
--TEST--
bcpow() incorrect argument count
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcpow();
?>
--EXPECTF--
Warning: Wrong parameter count for bcpow() in %s on line %d
+12
View File
@@ -0,0 +1,12 @@
--TEST--
bcpow() with a negative exponent
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcpow("2", "-4");
?>
--EXPECTF--
0
+16
View File
@@ -0,0 +1,16 @@
--TEST--
bcpowmod() - Raise an arbitrary precision number to another, reduced by a specified modulus
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcpowmod("5", "2", "7") . "\n";
echo bcpowmod("-2", "5", "7") . "\n";
echo bcpowmod("10", "2147483648", "2047");
?>
--EXPECT--
4
-4
790
@@ -0,0 +1,13 @@
--TEST--
bcscale() with negative argument
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
bcscale(-4);
echo bcdiv("20.56", "4");
?>
--EXPECTF--
5
@@ -0,0 +1,12 @@
--TEST--
bcadd() incorrect argument count
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=-2
--FILE--
<?php
echo bcadd("-4.27", "7.3");
?>
--EXPECTF--
3
+12
View File
@@ -0,0 +1,12 @@
--TEST--
bcsqrt() incorrect argument count
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcsqrt();
?>
--EXPECTF--
Warning: Wrong parameter count for bcsqrt() in %s on line %d
+12
View File
@@ -0,0 +1,12 @@
--TEST--
bcsqrt() with argument of 0
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcsqrt("0");
?>
--EXPECTF--
0
+12
View File
@@ -0,0 +1,12 @@
--TEST--
bcsub() incorrect argument count
--SKIPIF--
<?php if(!extension_loaded("bcmath")) print "skip"; ?>
--INI--
bcmath.scale=0
--FILE--
<?php
echo bcsub();
?>
--EXPECTF--
Warning: Wrong parameter count for bcsub() in %s on line %d
+5 -1
View File
@@ -1386,7 +1386,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu
convert_to_long_ex(zvalue);
if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) {
if (Z_LVAL_PP(zvalue) != 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set");
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set");
RETVAL_FALSE;
return 1;
}
@@ -1772,6 +1772,10 @@ PHP_FUNCTION(curl_setopt)
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
convert_to_long_ex(zoption);
if (Z_LVAL_PP(zoption) <= 0) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid curl configuration option");
RETURN_FALSE;
}
if (!_php_curl_setopt(ch, Z_LVAL_PP(zoption), zvalue, return_value TSRMLS_CC)) {
RETURN_TRUE;
@@ -17,7 +17,7 @@ if (!extension_loaded('curl')) print 'skip';
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -55,5 +55,10 @@ Disallow: /source.php
Disallow: /search.php
Disallow: /mod.php
Disallow: /manual/add-note.php
Disallow: /harming/humans
Disallow: /ignoring/human/orders
Disallow: /harm/to/self
CURL2
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -16,8 +16,8 @@ if (!extension_loaded('curl')) print 'skip';
$ch2=curl_init();
//SET URL AND OTHER OPTIONS
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__)."/curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata1.txt");
curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt");
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true);
@@ -17,6 +17,6 @@ curl_close($ch);
var_dump($succes);
?>
--EXPECTF--
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when %r(in safe_mode or an )?%ropen_basedir is set in %s.php on line %d
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when %r(safe_mode is enabled or an )?%ropen_basedir is set in %s.php on line %d
bool(false)
+1 -1
View File
@@ -30,6 +30,6 @@ var_dump( $curl_content );
--EXPECTF--
*** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in %s on line %d
Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d
bool(false)
===DONE===
+1 -1
View File
@@ -26,7 +26,7 @@
{ "msd", 1, 4, "Europe/Moscow" },
{ "gst", 0, 4, "Asia/Dubai" },
{ "pkt", 0, 5, "Asia/Karachi" },
{ "ist", 0, 5.5, "Asia/Calcutta" },
{ "ist", 0, 5.5, "Asia/Kolkata" },
{ "npt", 0, 5.75, "Asia/Katmandu" },
{ "yekt", 1, 6, "Asia/Yekaterinburg" },
{ "novst", 1, 7, "Asia/Novosibirsk" },
+5082 -4320
View File
File diff suppressed because it is too large. Load diff
+4 -2
View File
@@ -86,6 +86,8 @@
#define TIMELIB_ERROR 999
/* Some compilers like AIX, defines uchar in sys/types.h */
#undef uchar
typedef unsigned char uchar;
#define BSIZE 8192
@@ -467,7 +469,7 @@ static long timelib_parse_tz_cor(char **ptr)
char *begin = *ptr, *end;
long tmp;
while (**ptr != '\0') {
while (isdigit(**ptr) || **ptr == ':') {
++*ptr;
}
end = *ptr;
@@ -787,7 +789,7 @@ minutelz = [0-5][0-9];
second = minute | "60";
secondlz = minutelz | "60";
meridian = ([AaPp] "."? [Mm] "."?) [\000\t ];
tz = "("? [A-Za-z]{1,6} ")"? | [A-Z][a-z]+([_/][A-Z][a-z]+)+;
tz = "("? [A-Za-z]{1,6} ")"? | [A-Z][a-z]+([_/-][A-Za-z]+)+;
tzcorrection = [+-] hour24 ":"? minute?;
daysuf = "st" | "nd" | "rd" | "th";
+786 -825
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+6
View File
@@ -55,6 +55,12 @@ void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts)
if (ts >= 0) {
tmp_days = days + 1;
if (tmp_days >= DAYS_PER_LYEAR_PERIOD || tmp_days <= -DAYS_PER_LYEAR_PERIOD) {
cur_year += YEARS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD);
tmp_days -= DAYS_PER_LYEAR_PERIOD * (tmp_days / DAYS_PER_LYEAR_PERIOD);
}
while (tmp_days >= DAYS_PER_LYEAR) {
cur_year++;
if (timelib_is_leap(cur_year)) {
+1 -1
View File
@@ -35,7 +35,7 @@ static __inline __int64 php_date_llabs( __int64 i ) { return i >= 0? i: -i; }
#elif defined(__GNUC__) && __GNUC__ < 3
static __inline __int64_t php_date_llabs( __int64_t i ) { return i >= 0 ? i : -i; }
#else
static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i; }
static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i; }
#endif
/* {{{ arginfo */
+17
View File
@@ -0,0 +1,17 @@
--TEST--
Handling of large year values
--SKIPIF--
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
--FILE--
<?php
date_default_timezone_set("America/Toronto");
$t = mktime(0,0,0,1,1,292277026596);
var_dump(date("r", $t));
echo "OK\n";
?>
--EXPECT--
string(36) "Fri, 01 Jan 219250468 00:00:00 -0500"
OK
+70
View File
@@ -0,0 +1,70 @@
--TEST--
Bug #46111 (strtotime() returns false for some valid timezones)
--FILE--
<?php
date_default_timezone_set('Asia/Calcutta');
$timezones = timezone_identifiers_list();
# An empty list indicates no errors, but in this case some of them can not be
# parsed. All of those are on the backwards compatible list though, so we'll
# just accept those failures here.
print "[strtotime(timezone) == false - Begin List]\n";
foreach ($timezones as $zone) {
$date_string = "2008-01-01 13:00:00 " . $zone;
if (!strtotime($date_string)) {
echo $zone . "\n";
}
}
print "[strtotime(timezone) == false - End List]\n";
?>
--EXPECT--
[strtotime(timezone) == false - Begin List]
CST6CDT
Cuba
Egypt
Eire
EST5EDT
Etc/GMT0
Factory
GB
GB-Eire
GMT0
Greenwich
Hongkong
Iceland
Iran
Israel
Jamaica
Japan
Kwajalein
Libya
MST7MDT
Navajo
NZ
NZ-CHAT
Poland
Portugal
PRC
PST8PDT
ROC
ROK
Singapore
Turkey
Universal
US/Alaska
US/Aleutian
US/Arizona
US/Central
US/East-Indiana
US/Eastern
US/Hawaii
US/Indiana-Starke
US/Michigan
US/Mountain
US/Pacific
US/Pacific-New
US/Samoa
W-SU
Zulu
[strtotime(timezone) == false - End List]
+45
View File
@@ -0,0 +1,45 @@
--TEST--
Bug #51096: Test for "first day" vs "first day of".
--FILE--
<?php
$tests = array(
'first day',
'last day',
'next month',
'first day next month',
'last day next month',
);
foreach ( $tests as $test )
{
$result = date_parse( $test );
$rel = $result['relative'];
echo $test, "\n- month: ", $rel['month'], '; day: ', $rel['day'],
'; first-day-of: ', isset( $rel['first_day_of_month'] ) ? 'true' : 'false',
'; last-day-of: ', isset( $rel['last_day_of_month'] ) ? 'true' : 'false', "\n";
$date = new DateTime( '2010-03-06 15:21 UTC' );
echo '- ', $date->format( DateTime::ISO8601 );
$date->modify( $test );
echo ' -> ', $date->format( DateTime::ISO8601 ), "\n\n";
}
?>
--EXPECT--
first day
- month: 0; day: 1; first-day-of: false; last-day-of: false
- 2010-03-06T15:21:00+0000 -> 2010-03-07T15:21:00+0000
last day
- month: 0; day: -1; first-day-of: false; last-day-of: false
- 2010-03-06T15:21:00+0000 -> 2010-03-05T15:21:00+0000
next month
- month: 1; day: 0; first-day-of: false; last-day-of: false
- 2010-03-06T15:21:00+0000 -> 2010-04-06T15:21:00+0000
first day next month
- month: 1; day: 1; first-day-of: false; last-day-of: false
- 2010-03-06T15:21:00+0000 -> 2010-04-07T15:21:00+0000
last day next month
- month: 1; day: -1; first-day-of: false; last-day-of: false
- 2010-03-06T15:21:00+0000 -> 2010-04-05T15:21:00+0000
+12 -4
View File
@@ -226,11 +226,11 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[
fi
done
if test -z "$THIS_LIBS"; then
AC_MSG_CHECKING([for db$1 major version])
AC_MSG_CHECKING([for DB$1 major version])
AC_MSG_ERROR([Header contains different version])
fi
if test "$1" = "4"; then
AC_MSG_CHECKING([for db4 minor version and patch level])
AC_MSG_CHECKING([for DB4 minor version and patch level])
AC_EGREP_CPP(yes,[
#include "$THIS_INCLUDE"
#if DB_VERSION_MINOR != 1 || DB_VERSION_PATCH >= 25
@@ -275,11 +275,19 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[
if test "$PHP_DB4" != "no"; then
PHP_DBA_STD_BEGIN
dbdp="/usr/local/BerkeleyDB.4."
for i in $PHP_DB4 ${dbdp}6 ${dbdp}5 ${dbdp}4 ${dbdp}3 ${dbdp}2 ${dbdp}1 ${dbdp}0 /usr/local /usr; do
for i in $PHP_DB4 ${dbdp}8 ${dbdp}7 ${dbdp}6 ${dbdp}5 ${dbdp}4 ${dbdp}3 ${dbdp}2 ${dbdp}1 ${dbdp}0 /usr/local /usr; do
if test -f "$i/db4/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/db4/db.h
break
elif test -f "$i/include/db4.8/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/include/db4.8/db.h
break
elif test -f "$i/include/db4.7/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/include/db4.7/db.h
break
elif test -f "$i/include/db4.6/db.h"; then
THIS_PREFIX=$i
THIS_INCLUDE=$i/include/db4.6/db.h
@@ -306,7 +314,7 @@ if test "$PHP_DB4" != "no"; then
break
fi
done
PHP_DBA_DB_CHECK(4, db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
PHP_DBA_DB_CHECK(4, db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)])
fi
PHP_DBA_STD_RESULT(db4,Berkeley DB4)
+27
View File
@@ -43,6 +43,18 @@ static void php_dba_db4_errcall_fcn(
const char *errpfx, const char *msg)
{
TSRMLS_FETCH();
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8 && DB_VERSION_PATCH <= 26)
/* Bug 51086, Berkeley DB 4.8.26 */
/* This code suppresses a BDB 4.8 error message that BDB incorrectly emits */
{
char *function = get_active_function_name(TSRMLS_C);
if (function && (!strcmp(function,"dba_popen") || !strcmp(function,"dba_open"))
&& !strncmp(msg, "fop_read_meta", sizeof("fop_read_meta")-1)) {
return;
}
}
#endif
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s%s", errpfx?errpfx:"", msg);
}
@@ -67,6 +79,7 @@ DBA_OPEN_FUNC(db4)
struct stat check_stat;
int s = VCWD_STAT(info->path, &check_stat);
#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR <= 7) /* Bug 51086 */
if (!s && !check_stat.st_size) {
info->mode = DBA_TRUNC; /* force truncate */
}
@@ -80,6 +93,20 @@ DBA_OPEN_FUNC(db4)
(info->mode == DBA_CREAT && !s) ? 0 :
info->mode == DBA_WRITER ? 0 :
info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1;
#else
if (!s && !check_stat.st_size) {
info->mode = DBA_CREAT; /* force creation */
}
type = info->mode == DBA_READER ? DB_UNKNOWN :
(info->mode == DBA_TRUNC || info->mode == DBA_CREAT) ? DB_BTREE :
s ? DB_BTREE : DB_UNKNOWN;
gmode = info->mode == DBA_READER ? DB_RDONLY :
info->mode == DBA_CREAT ? DB_CREATE :
info->mode == DBA_WRITER ? 0 :
info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1;
#endif
if (gmode == -1) {
return FAILURE; /* not possible */
+6 -3
View File
@@ -3,13 +3,13 @@ Bug #36436 (DBA problem with Berkeley DB4)
--SKIPIF--
<?php
$handler = 'db4';
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
?>
--FILE--
<?php
$handler = 'db4';
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
$db = dba_popen($db_filename, 'c', 'db4');
@@ -22,10 +22,13 @@ var_dump(dba_firstkey($db));
var_dump(dba_nextkey($db));
dba_close($db);
unlink($db_filename);
?>
===DONE===
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
resource(%d) of type (dba persistent)
string(3) "XYZ"
+26
View File
@@ -0,0 +1,26 @@
--TEST--
Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't read valid db)
--SKIPIF--
<?php
$handler = 'cdb_make';
require_once(dirname(__FILE__) .'/skipif.inc');
?>
--FILE--
<?php
$db_file = dirname(__FILE__) .'/129php.cdb';
if (($db_make=dba_open($db_file, "n", 'cdb_make'))!==FALSE) {
dba_insert(pack('i',129), "Booo!", $db_make);
dba_close($db_make);
// write md5 checksum of generated database file
var_dump(md5_file($db_file));
@unlink($db_file);
} else {
echo "Error creating database\n";
}
?>
===DONE===
--EXPECT--
string(32) "1f34b74bde3744265acfc21e0f30af95"
===DONE===
+6 -3
View File
@@ -3,23 +3,26 @@ Bug #48240 (DBA Segmentation fault dba_nextkey)
--SKIPIF--
<?php
$handler = 'db4';
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
?>
--FILE--
<?php
$handler = 'db4';
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
$db = dba_open($db_filename, 'c', 'db4');
var_dump(dba_nextkey($db));
dba_close($db);
unlink($db_filename);
?>
===DONE===
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECT--
bool(false)
===DONE===
+7 -4
View File
@@ -3,7 +3,7 @@ Bug #49125 (Error in dba_exists C code)
--SKIPIF--
<?php
$handler = 'db4';
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
?>
--FILE--
<?php
@@ -11,7 +11,7 @@ Bug #49125 (Error in dba_exists C code)
error_reporting(E_ALL);
$handler = 'db4';
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
$db = dba_popen($db_filename, 'c', 'db4');
@@ -21,7 +21,10 @@ var_dump(dba_exists('foo', $db));
dba_close($db);
unlink($db_filename);
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECT--
bool(true)
+5
View File
@@ -0,0 +1,5 @@
<?php
$db_filename = dirname(__FILE__) .'/test0.dbm'; // see test.inc
@unlink($db_filename);
@unlink($db_filename.'.lck');
?>
+6 -2
View File
@@ -2,12 +2,12 @@
DBA File Creation Test
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
echo "database file created\n";
@@ -16,6 +16,10 @@ DBA File Creation Test
echo "$db_file does not exist\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
database file created
+6 -2
View File
@@ -2,12 +2,12 @@
DBA Insert/Fetch Test
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "This is a test insert", $db_file);
@@ -17,6 +17,10 @@ DBA Insert/Fetch Test
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
This is a test insert
+6 -2
View File
@@ -2,12 +2,12 @@
DBA Insert/Replace/Fetch Test
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "This is a test insert", $db_file);
@@ -19,6 +19,10 @@ DBA Insert/Replace/Fetch Test
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
This is the replacement text
+6 -2
View File
@@ -2,12 +2,12 @@
DBA Multiple Insert/Fetch Test
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "Content String 1", $db_file);
@@ -23,6 +23,10 @@ DBA Multiple Insert/Fetch Test
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
Another Content String Content String 2
+6 -2
View File
@@ -2,12 +2,12 @@
DBA FirstKey/NextKey Loop Test With 5 Items
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "Content String 1", $db_file);
@@ -30,6 +30,10 @@ DBA FirstKey/NextKey Loop Test With 5 Items
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
5YYYYY
+6 -2
View File
@@ -2,12 +2,12 @@
DBA FirstKey/NextKey with 2 deletes
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert("key1", "Content String 1", $db_file);
@@ -32,6 +32,10 @@ DBA FirstKey/NextKey with 2 deletes
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
3NYNYY
+11 -4
View File
@@ -2,16 +2,16 @@
DBA Multiple File Creation Test
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
if (!function_exists('dba_list')) die('skip dba_list() not available');
die("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
$db_file1 = dirname(__FILE__).'/test1.dbm';
$db_file2 = dirname(__FILE__).'/test2.dbm';
$db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm';
$db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm';
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
echo "database file created\n";
} else {
@@ -29,6 +29,13 @@ DBA Multiple File Creation Test
}
var_dump(dba_list());
dba_close($db_file);
@unlink($db_filename1);
@unlink($db_filename2);
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
+6 -2
View File
@@ -2,12 +2,12 @@
DBA magic_quotes_runtime Test
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
ini_set('magic_quotes_runtime', 0);
@@ -24,6 +24,10 @@ DBA magic_quotes_runtime Test
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
string(1) """
+6 -2
View File
@@ -2,12 +2,12 @@
DBA dba_popen Test
--SKIPIF--
<?php
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
print("info $HND handler used");
?>
--FILE--
<?php
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db=dba_popen($db_file, "n", $handler))!==FALSE) {
echo "Opened\n";
@@ -24,6 +24,10 @@ DBA dba_popen Test
echo dba_fetch("a", $db)."\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
Opened
+44
View File
@@ -0,0 +1,44 @@
--TEST--
DBA with array keys
--SKIPIF--
<?php
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
dba_insert(array("", "name0") , "Content String 1", $db_file);
dba_insert(array("key1", "name1") , "Content String 1", $db_file);
dba_insert(array("key2","name2"), "Content String 2", $db_file);
dba_insert("[key3]name3", "Third Content String", $db_file);
dba_insert(array("key4","name4"), "Another Content String", $db_file);
dba_insert(array("key5","name5"), "The last content string", $db_file);
$a = dba_firstkey($db_file);
$i=0;
while($a) {
$a = dba_nextkey($db_file);
$i++;
}
echo $i;
echo dba_exists(array("","name0"), $db_file) ? "Y" : "N";
for ($i=1; $i<5; $i++) {
echo dba_exists("[key$i]name$i", $db_file) ? "Y" : "N";
}
echo dba_exists(array("key5","name5"), $db_file) ? "Y" : "N";
echo "\n";
dba_close($db_file);
} else {
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: %s
6YYYYYY
+7 -3
View File
@@ -3,16 +3,20 @@ DBA CDB handler test
--SKIPIF--
<?php
$handler = 'cdb';
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die('info CDB does not support replace or delete');
?>
--FILE--
<?php
$handler = 'cdb';
require_once dirname(__FILE__) .'/test.inc';
require_once dirname(__FILE__) .'/dba_handler.inc';
require_once(dirname(__FILE__) .'/test.inc');
require_once(dirname(__FILE__) .'/dba_handler.inc');
?>
===DONE===
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECT--
database handler: cdb
5YYYYY
+7 -3
View File
@@ -5,13 +5,13 @@ magic_quotes_runtime=1
--SKIPIF--
<?php
$handler = 'cdb_make';
require_once dirname(__FILE__) .'/skipif.inc';
require_once(dirname(__FILE__) .'/skipif.inc');
die('info CDB_MAKE does not support reading');
?>
--FILE--
<?php
$handler = 'cdb_make';
require_once dirname(__FILE__) .'/test.inc';
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
// print md5 checksum of test.cdb which is generated by cdb_make program
var_dump(md5_file(dirname(__FILE__).'/test.cdb'));
@@ -32,7 +32,11 @@ magic_quotes_runtime=1
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECT--
database handler: cdb_make
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
string(32) "12fc5ba2b9dcfef2480e5324eeb5f3e5"
@@ -2,16 +2,20 @@
DBA DB4 handler test
--SKIPIF--
<?php
$handler = 'db4';
require_once dirname(__FILE__) .'/skipif.inc';
$handler = 'db4';
require_once(dirname(__FILE__) .'/skipif.inc');
?>
--FILE--
<?php
$handler = 'db4';
require_once dirname(__FILE__) .'/test.inc';
require_once dirname(__FILE__) .'/dba_handler.inc';
$handler = 'db4';
require_once(dirname(__FILE__) .'/test.inc');
require_once(dirname(__FILE__) .'/dba_handler.inc');
?>
===DONE===
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECT--
database handler: db4
3NYNYY
+32
View File
@@ -0,0 +1,32 @@
--TEST--
DBA DB4 New File Creation open("c") & Insert Test
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file = dba_open($db_filename, "c", $handler)) !== FALSE) {
echo "database file created\n";
dba_insert("key1", "This is a test insert", $db_file);
echo dba_fetch("key1", $db_file), "\n";
dba_close($db_file);
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
database file created
This is a test insert
+32
View File
@@ -0,0 +1,32 @@
--TEST--
DBA DB4 New File Creation open("n") & Insert Test
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) {
echo "database file created\n";
dba_insert("key1", "This is a test insert", $db_file);
echo dba_fetch("key1", $db_file), "\n";
dba_close($db_file);
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
database file created
This is a test insert
+41
View File
@@ -0,0 +1,41 @@
--TEST--
DBA DB4 File Creation open("c") with existing file
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
var_dump(file_put_contents($db_filename, "Dummy contents"));
if (($db_file = dba_open($db_filename, "c", $handler)) !== FALSE) {
if (file_exists($db_filename)) {
echo "database file created\n";
dba_close($db_file);
} else {
echo "File did not get created\n";
}
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
int(14)
Notice: dba_open(): %stest0.dbm: unexpected file type or format in %sdba_db4_003.php on line %d
Warning: dba_open(%stest0.dbm,c): Driver initialization failed for handler: db4: Invalid argument in %sdba_db4_003.php on line %d
Error creating %stest0.dbm
+40
View File
@@ -0,0 +1,40 @@
--TEST--
DBA DB4 Truncate Existing File open("n")
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
var_dump(file_put_contents($db_filename, "Dummy contents"));
if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) {
if (file_exists($db_filename)) {
echo "database file created\n";
dba_insert("key1", "This is a test insert", $db_file);
echo dba_fetch("key1", $db_file), "\n";
dba_close($db_file);
} else {
echo "File did not get created\n";
}
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
int(14)
database file created
This is a test insert
+32
View File
@@ -0,0 +1,32 @@
--TEST--
DBA DB4 New File Creation popen("c") & Insert Test
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) {
echo "database file created\n";
dba_insert("key1", "This is a test insert", $db_file);
echo dba_fetch("key1", $db_file), "\n";
dba_close($db_file);
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
database file created
This is a test insert
+32
View File
@@ -0,0 +1,32 @@
--TEST--
DBA DB4 New File Creation popen("n") & Insert Test
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) {
echo "database file created\n";
dba_insert("key1", "This is a test insert", $db_file);
echo dba_fetch("key1", $db_file), "\n";
dba_close($db_file);
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
database file created
This is a test insert
+41
View File
@@ -0,0 +1,41 @@
--TEST--
DBA DB4 File Creation popen("c") with existing invalid file
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
var_dump(file_put_contents($db_filename, "Dummy contents"));
if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) {
if (file_exists($db_filename)) {
echo "database file created\n";
dba_close($db_file);
} else {
echo "File did not get created\n";
}
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
int(14)
Notice: dba_popen(): %stest0.dbm: unexpected file type or format in %sdba_db4_007.php on line %d
Warning: dba_popen(%stest0.dbm,c): Driver initialization failed for handler: db4: Invalid argument in %sdba_db4_007.php on line %d
Error creating %stest0.dbm
+40
View File
@@ -0,0 +1,40 @@
--TEST--
DBA DB4 Truncate Existing File popen("n")
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
var_dump(file_put_contents($db_filename, "Dummy contents"));
if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) {
if (file_exists($db_filename)) {
echo "database file created\n";
dba_insert("key1", "This is a test insert", $db_file);
echo dba_fetch("key1", $db_file), "\n";
dba_close($db_file);
} else {
echo "File did not get created\n";
}
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
int(14)
database file created
This is a test insert
+53
View File
@@ -0,0 +1,53 @@
--TEST--
DBA DB4 Multiple File Creation Test
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
$db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm';
$db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm';
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
echo "database file created\n";
} else {
echo "$db_file does not exist\n";
}
if (($db_file1=dba_open($db_file1, "n", $handler))!==FALSE) {
echo "database file created\n";
} else {
echo "$db_file does not exist\n";
}
if (($db_file2=dba_open($db_file2, "n", $handler))!==FALSE) {
echo "database file created\n";
} else {
echo "$db_file does not exist\n";
}
var_dump(dba_list());
dba_close($db_file);
@unlink($db_filename1);
@unlink($db_filename2);
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
database file created
database file created
database file created
array(3) {
[%d]=>
string(%d) "%stest0.dbm"
[%d]=>
string(%d) "%stest1.dbm"
[%d]=>
string(%d) "%stest2.dbm"
}
+38
View File
@@ -0,0 +1,38 @@
--TEST--
DBA DB4 magic_quotes_runtime Test
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) {
ini_set('magic_quotes_runtime', 0);
dba_insert("key1", '"', $db_file);
var_dump(dba_fetch("key1", $db_file));
ini_set('magic_quotes_runtime', 1);
var_dump(dba_fetch("key1", $db_file));
dba_replace("key1", '\"', $db_file);
var_dump(dba_fetch("key1", $db_file));
ini_set('magic_quotes_runtime', 0);
var_dump(dba_fetch("key1", $db_file));
dba_close($db_file);
} else {
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
string(1) """
string(2) "\""
string(2) "\""
string(1) """
+36
View File
@@ -0,0 +1,36 @@
--TEST--
DBA DB4 with repeated key
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file=dba_open($db_filename, "c", $handler))!==FALSE) {
var_dump(dba_insert("key1", "Content String 1", $db_file));
var_dump(dba_insert("key2", "Content String 2", $db_file));
var_dump(dba_insert("key2", "Same key", $db_file));
echo dba_fetch("key1", $db_file), "\n";
echo dba_fetch("key2", $db_file), "\n";
dba_close($db_file);
} else {
echo "Error creating database\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
bool(true)
bool(true)
bool(false)
Content String 1
Content String 2
+31
View File
@@ -0,0 +1,31 @@
--TEST--
DBA DB4 New File Creation open("rl")
--SKIPIF--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/skipif.inc');
die("info $HND handler used");
?>
--FILE--
<?php
$handler = "db4";
require_once(dirname(__FILE__) .'/test.inc');
echo "database handler: $handler\n";
if (($db_file = dba_open($db_filename, "rl", $handler)) !== FALSE) {
echo "database file created\n";
dba_close($db_file);
} else {
echo "Error creating $db_filename\n";
}
?>
--CLEAN--
<?php
require(dirname(__FILE__) .'/clean.inc');
?>
--EXPECTF--
database handler: db4
Warning: dba_open(%stest0.dbm,rl): Driver initialization failed for handler: db4: No such file or directory in %sdba_db4_012.php on line %d
Error creating %stest0.dbm
Loaded 100 of 325 files, more files were not shown because too many files have changed in this diff. Show more