Commit Graph

1198 Commits

Author SHA1 Message Date
Xinchen Hui
67d7d03f00 Fixed bug #62987 (Assigning to ArrayObject[null][something] overrides all undefined variables)
The get_zval_ptr_ptr of spl_array handler should act as same as the vm's
2012-09-01 14:21:34 +08:00
Xinchen Hui
13bcf685cb Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray) 2012-08-23 23:27:16 +08:00
Xinchen Hui
42f91d6ac6 Fixed bug #62904 (Crash when cloning an object which inherits SplFixedArray) 2012-08-23 23:21:25 +08:00
Xinchen Hui
8722173ad5 Implemented FR #62840 (Add sort flag to ArrayObject::ksort) 2012-08-21 13:32:15 +08:00
Felipe Pena
2497bb97e7 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  - Value stored to var is never used
2012-08-19 12:55:43 -03:00
Felipe Pena
6cd0e446dd - Value stored to var is never used 2012-08-19 12:55:38 -03:00
Xinchen Hui
212cfb95d1 more test script for #62328 2012-08-13 11:03:35 +08:00
Xinchen Hui
777b6679a4 missed the test script 2012-07-21 23:30:32 +08:00
Xinchen Hui
cc30524c89 Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance gives Segmentation fault) 2012-07-21 23:26:18 +08:00
Xinchen Hui
0c996613c0 Fixed bug #62616 (ArrayIterator::count() from IteratorIterator instance gives Segmentation fault) 2012-07-21 22:45:16 +08:00
Stanislav Malyshev
a5d45bae85 Fixed bug #61527 (Recursive/ArrayIterator gives misleading notice when array empty or moved to the end) 2012-07-14 22:34:28 -07:00
donnut
53ba768ed8 removed unneccesary arrat and ini settings 2012-07-14 19:22:03 -07:00
donnut
4539d799bb addition SplFileObject tests 2012-07-14 19:21:50 -07:00
donnut
2cb7a678a1 new tests from PHP TestFest June 2012 2012-07-14 19:21:34 -07:00
Anatoliy Belsky
86428169d3 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  reverted changes for #62477
2012-07-12 10:57:26 +02:00
Anatoliy Belsky
ad7eeba3c1 reverted changes for #62477 2012-07-12 10:54:14 +02:00
Anatoliy Belsky
40f8010a13 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62477 LimitIterator int overflow
2012-07-11 22:29:45 +02:00
Anatoliy Belsky
b383ddf1e5 Fixed bug #62477 LimitIterator int overflow 2012-07-11 22:25:31 +02:00
Anatoliy Belsky
2032470e41 fixed #62433 test for win 2012-07-09 12:42:10 +02:00
Xinchen Hui
be4053cea0 Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to dot files). 2012-07-02 11:33:38 +08:00
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Johannes Schlüter
b025b9d0cf Fix #62432 ReflectionMethod random corrupt memory on high concurrent
This fixes the same issue in multiple extensions. This isn't needed
in later branches as 5.4 introduced object_properties_init()
2012-06-27 23:26:33 +02:00
Nikita Popov
fed1f2d124 Fixed bug RecursiveArrayIterator does not implement Countable
ArrayIterator implemented Countable only after it was already inherited by
RecursiveArrayIterator. Thus the interface was missing in RAI.
2012-06-19 18:32:44 +02:00
Nikita Popov
cce4764f13 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug RecursiveArrayIterator does not implement Countable

Conflicts:
	ext/spl/spl_array.c
2012-06-19 18:08:22 +02:00
Nikita Popov
4cba4c6193 Fixed bug RecursiveArrayIterator does not implement Countable
ArrayIterator implemented Countable only after it was already inherited by
RecursiveArrayIterator. Thus the interface was missing in RAI.
2012-06-19 18:04:14 +02:00
Xinchen Hui
a10da87c6a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #62073 (Different ways of iterating over an SplMaxHeap result in different keys)
2012-05-24 23:34:14 +08:00
Xinchen Hui
bde86a6639 Fixed bug #62073
(Different ways of iterating over an SplMaxHeap result in in different keys)
2012-05-24 23:31:05 +08:00
Reeze Xia
9205c4fd62 Fixed bug #62073 (Different ways of iterating over an SplMaxHeap result in different keys) 2012-05-23 20:42:06 +08:00
Anatoliy Belsky
adfb4c62b7 Fix bug 61671 ext\spl\tests\fileobject_003.phpt fails
The solution was already introduced in 5.4 by Etienne Kneuss and
Pierre but wasn't merged back into 5.3 . SplFileObject should
not be used with directories. So just putting together all the
necessary pieces from 5.4
2012-04-19 11:33:12 +02:00
Anatoliy Belsky
b2f2e1d6cc Fix bug #61659 Test ext\spl\tests\bug60082.phpt fails 2012-04-10 14:03:19 +02:00
Gustavo André dos Santos Lopes
593578c8c1 Merge branch '5.3' into 5.4 2012-03-28 13:06:05 +01:00
Gustavo André dos Santos Lopes
f07dd29fdc Fixed problem introduced in a763929 (fixing bug #61347).
The test added in 8c44c85 should now pass.
2012-03-28 13:04:41 +01:00
Shein Alexey
1b179545c2 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Added failing test for ArrayObject::offsetExists().
2012-03-27 19:00:28 +05:00
Shein Alexey
ddac4688e8 Added failing test for ArrayObject::offsetExists(). 2012-03-27 18:59:04 +05:00
Gustavo André dos Santos Lopes
e018e2ae86 Merge branch '5.3' into 5.4 2012-03-23 22:14:36 +00:00
Gustavo André dos Santos Lopes
372801d94c Fixed tests that var_dump/print_r DOM objects. 2012-03-23 22:08:33 +00:00
Gustavo André dos Santos Lopes
0cf70b1a42 Merge branch '5.3' into 5.4 2012-03-23 11:32:20 +00:00
Gustavo André dos Santos Lopes
3960def881 Fixed bug #61482, caused by the fix to bug #61418.
Turns out I'd forgotten to also update the destructor for the iterator
returned by DirectoryIterator.
The iterator for DirectoryIterator maintains the same ->current pointer
throughout its existence (the DirectoryIterator itself) and returns it
(the same object) everytime a value is requested from the iterator.
Moving forward the iterator only changes the object. Previous code
added two references to the object in get_iterator on the account of
1) the iterator memory living in its DirectoryIterator object and
2) the object being stored in iterator->current. This seems to be
unnecessary. Iterators are not responsible for incrementing the refcount
of the values they yield, that's up to the caller (the engine). What
matters for the iterator is that the object exists as long as the
iterator exists and this can be guaranteed by incremented the refcount
only once. Consequently, I only add one reference in get_iterator
(and reclaim it in the iterator destructor).
2012-03-23 11:19:19 +00:00
Gustavo André dos Santos Lopes
85725337d5 Revert "Revert "- Fixed bug #61418 (Segmentation fault when DirectoryIterator's or" - causes bug #61482"
This reverts commit a89c4a34ee.
2012-03-23 09:40:27 +00:00
Stanislav Malyshev
bcc15b5633 Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Revert "- Fixed bug #61418 (Segmentation fault when DirectoryIterator's or" - causes bug #61482
  Add initialization tests for SQLT_INT binds
  Fix NEWS
2012-03-22 22:30:51 -07:00
Stanislav Malyshev
a89c4a34ee Revert "- Fixed bug #61418 (Segmentation fault when DirectoryIterator's or" - causes bug #61482
This reverts commit 714f1ff4b3.
2012-03-22 22:29:50 -07:00
Dmitry Stogov
dd33437eee Revert "Fixed reference counting"
This reverts commit 752fec88ef.
2012-03-22 15:52:32 +04:00
Dmitry Stogov
672fe54a00 Revert "Fixed reference counting"
This reverts commit 14af1fe692.
2012-03-22 15:51:58 +04:00
Dmitry Stogov
752fec88ef Fixed reference counting 2012-03-22 15:03:38 +04:00
Dmitry Stogov
14af1fe692 Fixed reference counting 2012-03-22 15:03:16 +04:00
Gustavo André dos Santos Lopes
54f0d50d3e Made some SplFileObject::fputcsv not pollute the working dir. 2012-03-21 13:13:17 +00:00
Gustavo André dos Santos Lopes
0f001703a8 Fixed bug #61453.
The "hash" function used strncpy on data that would have NUL bytes, ending the
copy prematurely and causing collisions between objects.
2012-03-21 12:42:09 +00:00
Joshua Thijssen
91f2d3809e Issue-60742: Added FilesystemIterator::OTHER_MODE_MASK 2012-03-19 21:48:55 +01:00
Gustavo André dos Santos Lopes
d870a41118 - Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
FilesystemIterator's iterators are requested more than once without
  having had its dtor callback called in between).
2012-03-18 15:07:20 +00:00
Gustavo André dos Santos Lopes
714f1ff4b3 - Fixed bug #61418 (Segmentation fault when DirectoryIterator's or
FilesystemIterator's iterators are requested more than once without
  having had its dtor callback called in between).
2012-03-18 15:07:20 +00:00
Felipe Pena
af2fc625df - Fixed memory leak when calling SplFileInfo's constructor twice 2012-03-11 15:42:57 +00:00
Felipe Pena
80cb6e56f6 - Fixed memory leak when calling SplFileInfo's constructor twice 2012-03-11 15:42:57 +00:00
Xinchen Hui
533d90066e Fix test 2012-03-11 08:30:30 +00:00
Xinchen Hui
430486f0bf Fixed bug #61347 (inconsist isset behavior of Arrayobject) 2012-03-11 08:27:55 +00:00
Xinchen Hui
a7639291b4 Fixed bug #61347 (inconsist isset behavior of Arrayobject) 2012-03-11 08:27:55 +00:00
Gustavo André dos Santos Lopes
88ba84fa7d - Fixed bug #61326 (ArrayObject comparison). 2012-03-10 17:19:39 +00:00
Gustavo André dos Santos Lopes
7bbf5fe650 - Fixed bug #61326 (ArrayObject comparison). 2012-03-10 17:19:39 +00:00
Nikita Popov
3bc1455496 Fix bug #60596: Code Cleanup Removing Superfluous If Statement
Cleanup only, no function change. Patch by ircmaxell.
2012-03-04 13:52:48 +00:00
Nikita Popov
6d08a84614 Fix bug #60596: Code Cleanup Removing Superfluous If Statement
Cleanup only, no function change. Patch by ircmaxell.
2012-03-04 13:52:48 +00:00
Olivier DOUCET
e613889d50 more verbose skip reason in test files with not so obvious extension requirements 2012-02-25 12:10:41 +00:00
Olivier DOUCET
ce535f1819 more verbose skip reason in test files with not so obvious extension requirements 2012-02-25 12:10:41 +00:00
Etienne Kneuss
78c8b4c8ff Fix test 2012-02-01 13:25:32 +00:00
Rasmus Lerdorf
ac5718cdd3 These tests don't work if run as root 2012-01-08 18:43:30 +00:00
Rasmus Lerdorf
f1191166d8 These tests don't work if run as root 2012-01-08 18:43:30 +00:00
Rasmus Lerdorf
adc8c296ac Make sure gc is enabled 2012-01-08 18:22:50 +00:00
Rasmus Lerdorf
a7dca551f7 This test only works if gc is enabled 2012-01-08 18:21:13 +00:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Patrick Allaert
ea25a9be03 Added tests contributions on spl_autoload and stream_context_set_option()
Thank you Jean-Marc Fontaine and Alter Way
2011-12-09 11:45:39 +00:00
Patrick Allaert
183493d624 Added tests contributions on spl_autoload and stream_context_set_option()
Thank you Jean-Marc Fontaine and Alter Way
2011-12-09 11:23:19 +00:00
Michael Wallner
d8ca919da1 Fixed bug #60240 (invalid read/writes when unserializing specially crafted strings) 2011-12-02 11:50:22 +00:00
Antony Dovgal
c3b83e833d fix bug #60082 (Crash in ArrayObject() when using recursive references)
--Tis line, and those below, will be ignored--

M    trunk/ext/spl/spl_array.c
M    branches/PHP_5_4/ext/spl/spl_array.c
M    branches/PHP_5_3/ext/spl/spl_array.c
M    branches/PHP_5_3/NEWS
2011-11-18 05:22:35 +00:00
Antony Dovgal
ea97932279 fix bug #60082 (Crash in ArrayObject() when using recursive references)
--Tis line, and those below, will be ignored--

M    trunk/ext/spl/spl_array.c
M    branches/PHP_5_4/ext/spl/spl_array.c
M    branches/PHP_5_3/ext/spl/spl_array.c
M    branches/PHP_5_3/NEWS
2011-11-18 05:22:35 +00:00
Rasmus Lerdorf
3f930c10bf functor? Where did that come from? 2011-11-14 16:23:56 +00:00
Lars Strojny
7d0fe66ebe Adjusting error messages 2011-11-14 00:26:37 +00:00
Felipe Pena
c1e510aea8 - Fixed bug #60261 (phar dos null pointer) 2011-11-11 21:39:11 +00:00
Felipe Pena
72a133f155 - Fixed bug #60261 (phar dos null pointer) 2011-11-11 21:39:11 +00:00
Peter Cowburn
9b86852d6e add 3rd parameter to arg info for splfileobject fgetcsv/setcsvcontrol (bug #60201) 2011-11-02 13:24:46 +00:00
Ferenc Kovacs
28faed47c4 ignore this test on FreeBSD per #60186 2011-11-01 10:25:47 +00:00
Ferenc Kovacs
bb4f96b2a1 duh 2011-11-01 10:20:39 +00:00
Ferenc Kovacs
5a2a02f655 marking ext/spl/tests/bug60082.phpt as slow test 2011-11-01 10:10:24 +00:00
Gustavo André dos Santos Lopes
32f7337bd4 - Reverted changes that required constructor overrides to invoke the parent
constructor in several SPL classes and applied 5.3 fixes instead.
  Related bugs: #54384, #55175 and #55300
2011-10-29 23:17:18 +00:00
Stanislav Malyshev
d81ea16ef1 Changed silent conversion of array to string to produce a notice. (Patrick) 2011-10-21 06:08:47 +00:00
Xinchen Hui
d2c8d30bb9 Test for #60082 2011-10-19 02:28:53 +00:00
Felipe Pena
83ca3c8ff9 - Fixed bug #60042 (spl_autoload_call may manipulate a dangling pointer)
patch by: tom at punkave dot com
2011-10-12 01:03:15 +00:00
Felipe Pena
71eaaf6567 - Fixed bug #60042 (spl_autoload_call may manipulate a dangling pointer)
patch by: tom at punkave dot com
2011-10-12 01:03:15 +00:00
Hannes Magnusson
f40e5204d4 Fixed bug #55807 (Wrong value for splFileObject::SKIP_EMPTY) 2011-09-30 14:17:23 +00:00
Hannes Magnusson
5fba3ba7c3 Fixed bug #55807 (Wrong value for splFileObject::SKIP_EMPTY) 2011-09-30 14:17:23 +00:00
Hannes Magnusson
3dabada846 Use the default stream context for FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator 2011-09-30 14:12:26 +00:00
Hannes Magnusson
f19a112185 Test for non-string replacement, bug#54304 2011-09-12 17:20:44 +00:00
Hannes Magnusson
76d9a3fa3d Test for non-string replacement, bug#54304 2011-09-12 17:20:44 +00:00
Hannes Magnusson
75c4d6f888 Allow replacement to be any scalar value 2011-09-12 13:21:57 +00:00
Hannes Magnusson
2c5574b3d8 Allow replacement to be any scalar value 2011-09-12 13:21:57 +00:00
Pierre Joye
7a3d89a9aa - nuke unused var 2011-09-09 07:57:29 +00:00
Pierre Joye
2d9f758435 - improve r316420, function must return a value 2011-09-09 07:56:42 +00:00
Pierre Joye
de12ac023c - improve r316420 (SplFileObject cannot and should not accept directories) 2011-09-08 23:12:32 +00:00
Etienne Kneuss
1e04e19a37 MFH: adapt check for __construct bypass 2011-09-08 23:10:40 +00:00
Pierre Joye
38c698c062 - improve r316420 (SplFileObject cannot and should not accept directories) 2011-09-08 23:07:48 +00:00
Pierre Joye
376ba8c92e - force LF 2011-09-08 16:10:07 +00:00
Etienne Kneuss
5cc7663098 SplFileObject does not accept directories. It did not check for that and blindly opened the directory, which works on linux but fails on windows. Now SplFileObject uses a stat() call to make sure it isn't a directory, if it is, it fails with an exception. Tests have been changed accordingly. 2011-09-08 15:52:59 +00:00