1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 06:21:12 +02:00
Commit Graph

1002 Commits

Author SHA1 Message Date
Peter Cowburn
ac8ece2718 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
41abc6d017 - 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
ed12ebc79c Changed silent conversion of array to string to produce a notice. (Patrick) 2011-10-21 06:08:47 +00:00
Felipe Pena
261353382f - 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
b4f6baf9aa Fixed bug #55807 (Wrong value for splFileObject::SKIP_EMPTY) 2011-09-30 14:17:23 +00:00
Hannes Magnusson
317f933cd6 Use the default stream context for FilesystemIterator, GlobIterator and (Recursive)DirectoryIterator 2011-09-30 14:12:26 +00:00
Hannes Magnusson
4653534643 Test for non-string replacement, bug#54304 2011-09-12 17:20:44 +00:00
Hannes Magnusson
4ff1539384 Allow replacement to be any scalar value 2011-09-12 13:21:57 +00:00
Pierre Joye
c35d34a10d - nuke unused var 2011-09-09 07:57:29 +00:00
Pierre Joye
ba07a1c72b - improve r316420, function must return a value 2011-09-09 07:56:42 +00:00
Pierre Joye
6550af384f - improve r316420 (SplFileObject cannot and should not accept directories) 2011-09-08 23:12:32 +00:00
Pierre Joye
4ccef0b950 - improve r316420 (SplFileObject cannot and should not accept directories) 2011-09-08 23:07:48 +00:00
Pierre Joye
59571f6fce - force LF 2011-09-08 16:10:07 +00:00
Etienne Kneuss
3afb143e65 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
Hannes Magnusson
12d67c1a45 Fix cleanup routines 2011-09-07 12:05:19 +00:00
Xinchen Hui
b7788089e1 fix skipif description 2011-09-07 00:59:10 +00:00
Pierre Joye
f2b8c5395c - use a more portable name for the filename 2011-09-06 11:24:21 +00:00
Pierre Joye
1d22c75eb3 - use something we know it exists... 2011-09-06 07:26:05 +00:00
Pierre Joye
80a2175c37 - skip on win, name.. name. are not valid names 2011-09-06 07:23:20 +00:00
Hannes Magnusson
eba373139c Add skipifs for bug#54971 (patch by datibbaw@) 2011-08-30 13:46:24 +00:00
Etienne Kneuss
80742189b8 Fix CID 593 Mark the missing break by an explicit comment, we DO intend to fall through here 2011-08-12 22:20:35 +00:00
Etienne Kneuss
5128d59331 Fix CID 538/539, explicitely check for something that should never occur 2011-08-12 22:05:10 +00:00
Etienne Kneuss
81700b8b2f Fix CID 1211, unused intern variable 2011-08-12 21:46:40 +00:00
Etienne Kneuss
482e4b9d70 Fix validator for SplFileInfo constructor 2011-08-08 12:05:34 +00:00
Xinchen Hui
802b871ea1 Sizeof mismatch 2011-08-08 08:49:55 +00:00
Xinchen Hui
8bae5e220e Wrong sizeof 2011-08-08 02:33:03 +00:00
Peter Cowburn
4d28bb722b added (recursive)callbackfilteriterator to spl_classes() (bug #55287) 2011-07-27 08:48:08 +00:00
Pierre Joye
438cc3e255 - use cwd_expand now 2011-07-26 07:30:41 +00:00
Felipe Pena
da376383e8 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Stefan Marr
f9cb269d59 Added forgotten tests cases for class_uses() from commit rev. 313640 2011-07-24 10:20:08 +00:00
Stefan Marr
35f58b972f Added missing class_uses(..) function to SPL to mirror class_implements(..).
# Was pointed out as missing in bug #55266.
2011-07-23 19:08:43 +00:00
Pierrick Charron
fb5da94c1b Delete empty test files (old MQ tests) 2011-07-22 12:12:05 +00:00
Pierre Joye
cc1c7af037 - 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
Etienne Kneuss
28c3a180b2 Fix crash 2011-07-12 21:57:14 +00:00
Etienne Kneuss
c13f2c3e2c Fix #48860 Implement Serialization for DLL 2011-07-12 21:43:17 +00:00
Pierrick Charron
e53ca46fc0 Fixed bug #54971 (Wrong result when using iterator_to_array with use_keys on true) 2011-06-28 11:09:06 +00:00
Knut Urdalen
785a7a5056 fixed temp directory names in spl tests 2011-06-25 07:45:41 +00:00
Knut Urdalen
bf61fbb33a fixed/refactored some spl tests related to owner/group retrieval 2011-06-25 04:50:42 +00:00
Felipe Pena
b8d10158d1 - Drop C++ style comments 2011-06-10 23:14:15 +00:00
Felipe Pena
4737910b69 - 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
Felipe Pena
a2124382ac - Possible fix for bug #54609 (Certain implementation(s) of SplFixedArray cause hard crash) 2011-06-05 01:38:12 +00:00
Felipe Pena
df4c4a9e7f - Fixed bug #54970 (SplFixedArray::setSize() isn't resizing) 2011-06-02 00:40:27 +00:00
Dmitry Stogov
77ed819430 Fixed bug #54323 (Accessing unset()'ed ArrayObject's property causes crash) 2011-04-07 14:52:30 +00:00
Pierrick Charron
1368364469 Fix common typos in the source code (Reported in Bug #54065)
# External libraries were excluded
# Thanks eitan at eitanadler dot com for the first patch :)
2011-04-03 21:46:52 +00:00
Gustavo André dos Santos Lopes
f7b7b6aa9e - Improved upon r309729.
- Extented strategy to remaining the classes on spl_directory.c, even those that don't crash.
- UPGRADING.
- Better bug54384.phpt, with all the classes covered.
2011-03-27 22:44:34 +00:00
Arnaud Le Blanc
b83e243c23 Added CallbackFilterIterator and RecursiveCallbackFilterIterator classes
[DOC] This is a concrete FilterIterator which takes a callback as
constructor parameter, and uses this callback for filtering. This allows
to use FilterIterator without extending it.

CallbackFilterIterator Example:

$it = new ArrayIterator(range(1,100));
$it = new CallbackFilterIterator($it, function($value) {
	return $value % 2;
});
foreach($it as $value) // ...

RecursiveCallbackFilterIterator Example:

$it = new RecursiveDirectoryIterator("/");
$it = new RecursiveCallbackFilterIterator($it, function($file, $k, $it) {
	return $it->hasChildren() || $file->getSize() > 1024;
});
foreach(new RecursiveIteratorIterator($it) as $file) // ...

The callback takes the current value, the current key and the inner
iterator as parameters.
2011-03-27 20:13:27 +00:00
Gustavo André dos Santos Lopes
c2fe893985 - Fixed bug #54384: Several SPL classes crash when parent constructor is
not called.
#Merge to 5.3 pending (slight BC break on AppendIterator, as it's no
#longer possible to defer the call to the parent constructor until
#after the constructor is performed).
#Bugs fixed in an atypical way for SPL. The parent constructor call
#check is performed at construction time by using a wrapper constructor
#instead of a check on the beginning of each instance method.
#Perhaps this should be uniformized in trunk; this method was mainly
#applied only to the ones crashing, except a few iterators (at least
#AppendIterator and RecursiveIteratorIterator).
2011-03-27 04:21:06 +00:00
Felipe Pena
39e0aa4dc6 - Fixed bug #54292 (Wrong parameter causes crash in SplFileObject::__construct()) 2011-03-23 22:46:04 +00:00
Felipe Pena
11c4a5b96a - Fixed bug #54281 (Crash in non-initialized RecursiveIteratorIterator) 2011-03-22 22:41:16 +00:00
Gustavo André dos Santos Lopes
8deb11c0c3 - Fixed bug #54291 (Crash iterating DirectoryIterator for dir name starting
with \0).
2011-03-19 23:15:04 +00:00