iliaa Mon Jun 18 16:53:10 2007 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/standard/tests/array bug41686.phpt
Modified files:
/php-src NEWS
/php-src/ext/standard array.c
Log:
Fixed bug #41686 (Omitting length param in array_slice not possible).
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.787&r2=1.2027.2.547.2.788&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.787 php-src/NEWS:1.2027.2.547.2.788
--- php-src/NEWS:1.2027.2.547.2.787 Mon Jun 18 16:46:21 2007
+++ php-src/NEWS Mon Jun 18 16:53:09 2007
@@ -34,6 +34,8 @@
- Fixed bug #41724 (libxml_get_last_error() - errors survice request scope).
(thekid at php dot net, Ilia)
- Fixed bug #41717 (imagepolygon does not respect thickness). (Pierre)
+- Fixed bug #41686 (Omitting length param in array_slice not possible).
+ (Ilia)
- Fixed bug #41655 (open_basedir bypass via glob()). (Ilia)
- Fixed bug #41640 (get_class_vars produces error on class constants).
(Johannes)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/array.c?r1=1.308.2.21.2.28&r2=1.308.2.21.2.29&diff_format=u
Index: php-src/ext/standard/array.c
diff -u php-src/ext/standard/array.c:1.308.2.21.2.28
php-src/ext/standard/array.c:1.308.2.21.2.29
--- php-src/ext/standard/array.c:1.308.2.21.2.28 Tue Jun 5 12:12:55 2007
+++ php-src/ext/standard/array.c Mon Jun 18 16:53:09 2007
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: array.c,v 1.308.2.21.2.28 2007/06/05 12:12:55 tony2001 Exp $ */
+/* $Id: array.c,v 1.308.2.21.2.29 2007/06/18 16:53:09 iliaa Exp $ */
#include "php.h"
#include "php_ini.h"
@@ -2213,7 +2213,7 @@
is not passed */
convert_to_long_ex(offset);
offset_val = Z_LVAL_PP(offset);
- if (argc >= 3) {
+ if (argc >= 3 && Z_TYPE_PP(length) != IS_NULL) {
convert_to_long_ex(length);
length_val = Z_LVAL_PP(length);
} else {
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/bug41686.phpt?view=markup&rev=1.1
Index: php-src/ext/standard/tests/array/bug41686.phpt
+++ php-src/ext/standard/tests/array/bug41686.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php