1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 00:48:25 +02:00
Commit Graph

230 Commits

Author SHA1 Message Date
Xinchen Hui c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Nikita Popov 0d7a638866 Implement variadic function syntax
As per RFC: https://wiki.php.net/rfc/variadics
2013-09-26 18:39:17 +02:00
Nikita Popov ad976d8240 Fix bug #64782: SplFileObject constructor make $context optional 2013-09-12 17:46:14 +02:00
Xinchen Hui c2cfc242c4 Merge branch 'PHP-5.4' into PHP-5.5 2013-06-27 12:38:13 +08:00
Xinchen Hui fa8611c81e Fixed bug #65136 (RecursiveDirectoryIterator segfault) 2013-06-27 12:37:57 +08:00
Xinchen Hui 9d9ec2a90e Merge branch 'PHP-5.4' into PHP-5.5 2013-06-25 13:38:50 +08:00
Xinchen Hui 38eb909d06 Fixed Bug #61828 (Memleak when calling Directory(Recursive)Iterator/Spl(Temp)FileObject ctor twice) 2013-06-25 13:38:27 +08:00
Nikita Popov fcc6611de9 Add support for non-scalar Iterator keys in foreach
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Gustavo Lopes b8b3bb08b2 Merge branch 'bug64023' into PHP-5.4
* bug64023:
  Fix bug #64023 (__toString() & SplFileInfo)

Conflicts:
	Zend/zend_vm_def.h
	Zend/zend_vm_execute.h
2013-01-22 12:24:33 +01:00
Gustavo Lopes aa0adce47d Fix bug #64023 (__toString() & SplFileInfo)
Defining a __toString() method was having no effect when concatenating
the object. This was because the cast_object() handler would ignore
__toString().

Using echo() directly would actually use __toString(), but this was a
bug: the ECHO handler would try zend_std_cast_object_tostring() before
cast_object(), but cast_object() should have priority as
zend_std_cast_object_tostring() assumes an object with a
zend_class_entry.
2013-01-22 11:33:29 +01:00
Xinchen Hui 0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Xinchen Hui a2045ff332 Happy New Year~ 2013-01-01 16:02:16 +08:00
Xinchen Hui 6284ef112e Fixed bug #63236 (Executable permission on various source files) 2012-10-09 13:28:31 +08:00
Xinchen Hui e4a8fa6a15 Merge branch 'PHP-5.3' into PHP-5.4 2012-10-09 13:29:51 +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 be4053cea0 Fixed bug #62433 (Inconsistent behavior of RecursiveDirectoryIterator to dot files). 2012-07-02 11:33:38 +08: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
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
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 672fe54a00 Revert "Fixed reference counting"
This reverts commit 14af1fe692.
2012-03-22 15:51:58 +04:00
Dmitry Stogov 14af1fe692 Fixed reference counting 2012-03-22 15:03:16 +04: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
Felipe Pena e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena 4e19825281 - Year++ 2012-01-01 13:15:04 +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
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
Hannes Magnusson 3dabada846 Use the default stream context for FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator 2011-09-30 14:12:26 +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
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
Etienne Kneuss cf2db20123 Fix CID 547, make static analyzer happy 2011-08-12 21:57:54 +00:00
Pierre Joye 5107df2d04 - use cwd_expand now 2011-07-26 07:30:41 +00:00
Felipe Pena 23e438594d - Make usage of new PHP_FE_END macro 2011-07-25 11:42:53 +00:00
Felipe Pena 4b30846b50 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Pierre Joye 9805e1674a - remove magic quotes support, functions are kept (see the NEWS entry for the details) for BC reasons but do not allow to set enable MQ 2011-07-22 11:25:30 +00:00
Felipe Pena 32b5f8a1a3 - Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
2011-06-06 21:28:16 +00:00