[PHP-CVS] cvs: php-src(PHP_5_3) / UPGRADING
kalle Fri May 22 03:32:21 2009 UTC Modified files: (Branch: PHP_5_3) /php-srcUPGRADING Log: getClosureThis() and $this handling in closures was removed http://cvs.php.net/viewvc.cgi/php-src/UPGRADING?r1=1.1.2.3.2.1.2.8&r2=1.1.2.3.2.1.2.9&diff_format=u Index: php-src/UPGRADING diff -u php-src/UPGRADING:1.1.2.3.2.1.2.8 php-src/UPGRADING:1.1.2.3.2.1.2.9 --- php-src/UPGRADING:1.1.2.3.2.1.2.8 Fri May 15 09:44:08 2009 +++ php-src/UPGRADING Fri May 22 03:32:20 2009 @@ -1,4 +1,4 @@ -$Id: UPGRADING,v 1.1.2.3.2.1.2.8 2009/05/15 09:44:08 kalle Exp $ +$Id: UPGRADING,v 1.1.2.3.2.1.2.9 2009/05/22 03:32:20 kalle Exp $ UPGRADE NOTES - PHP 5.3 @@ -411,7 +411,6 @@ DateTime::getLastErrors() - PDO_Firebird: PDO::setAttribute() - Reflection: ReflectionProperty::setAccessible() - ReflectionFunction::getClosureThis() ReflectionFunction::inNamespace() ReflectionFunction::getNamespaceName() ReflectionFunction::getShortName() -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/reflection php_reflection.c /ext/reflection/tests bug48336.phpt
lbarnaudThu May 21 16:05:11 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/reflection/tests bug48336.phpt Modified files: /php-srcNEWS /php-src/ext/reflection php_reflection.c Log: MFH: Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not work with redeclared property) (patch by Markus dot Lidel at shadowconnect dot com) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1516&r2=1.2027.2.547.2.1517&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1516 php-src/NEWS:1.2027.2.547.2.1517 --- php-src/NEWS:1.2027.2.547.2.1516Thu May 21 12:53:24 2009 +++ php-src/NEWSThu May 21 16:05:10 2009 @@ -16,6 +16,8 @@ - Fixed segfault on invalid session.save_path. (Hannes) - Fixed leaks in imap when a mail_criteria is used. (Pierre) +- Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not work with + redeclared property). (patch by Markus dot Lidel at shadowconnect dot com) - Fixed bug #48326 (constant MSG_DONTWAIT not defined). (Arnaud) - Fixed bug #48313 (fgetcsv() does not return null for empty rows). (Ilia) - Fixed bug #48309 (stream_copy_to_stream() and fpasstru() do not update stream http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.56&r2=1.164.2.33.2.57&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.56 php-src/ext/reflection/php_reflection.c:1.164.2.33.2.57 --- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.56 Mon Apr 27 19:54:34 2009 +++ php-src/ext/reflection/php_reflection.c Thu May 21 16:05:11 2009 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_reflection.c,v 1.164.2.33.2.56 2009/04/27 19:54:34 felipe Exp $ */ +/* $Id: php_reflection.c,v 1.164.2.33.2.57 2009/05/21 16:05:11 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -4126,6 +4126,10 @@ break; } ce = tmp_ce; + if (tmp_ce == tmp_info->ce) { + /* declared in this class, done */ + break; + } tmp_ce = tmp_ce->parent; } @@ -4948,7 +4952,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.164.2.33.2.56 2009/04/27 19:54:34 felipe Exp $"); + php_info_print_table_row(2, "Version", "$Id: php_reflection.c,v 1.164.2.33.2.57 2009/05/21 16:05:11 lbarnaud Exp $"); php_info_print_table_end(); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug48336.phpt?view=markup&rev=1.1 Index: php-src/ext/reflection/tests/bug48336.phpt +++ php-src/ext/reflection/tests/bug48336.phpt --TEST-- Bug #48286 (ReflectionProperty::getDeclaringClass() does not work with redeclared properties) --FILE-- '); try { $rp = new ReflectionProperty($class, 'prop'); print($rp->getDeclaringClass()->getName()); } catch(Exception $e) { print('N/A'); } print("\n"); } ?> --EXPECT-- A => N/A B => B C => C D => C E => C F => F -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/reflection php_reflection.c /ext/reflection/tests bug48336.phpt
lbarnaudThu May 21 16:01:37 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/reflection/tests bug48336.phpt Modified files: /php-src/ext/reflection php_reflection.c Log: MFH: Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not work with redeclared property) (patch by Markus dot Lidel at shadowconnect dot com) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.164.2.33.2.45.2.56&r2=1.164.2.33.2.45.2.57&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.56 php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.57 --- php-src/ext/reflection/php_reflection.c:1.164.2.33.2.45.2.56Mon Apr 27 19:48:45 2009 +++ php-src/ext/reflection/php_reflection.c Thu May 21 16:01:37 2009 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.56 2009/04/27 19:48:45 felipe Exp $ */ +/* $Id: php_reflection.c,v 1.164.2.33.2.45.2.57 2009/05/21 16:01:37 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -4603,6 +4603,10 @@ break; } ce = tmp_ce; + if (tmp_ce == tmp_info->ce) { + /* declared in this class, done */ + break; + } tmp_ce = tmp_ce->parent; } @@ -5438,7 +5442,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Revision: 1.164.2.33.2.45.2.56 $"); + php_info_print_table_row(2, "Version", "$Revision: 1.164.2.33.2.45.2.57 $"); php_info_print_table_end(); } /* }}} */ @@ -5452,7 +5456,7 @@ NULL, NULL, PHP_MINFO(reflection), - "$Revision: 1.164.2.33.2.45.2.56 $", + "$Revision: 1.164.2.33.2.45.2.57 $", STANDARD_MODULE_PROPERTIES }; /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug48336.phpt?view=markup&rev=1.1 Index: php-src/ext/reflection/tests/bug48336.phpt +++ php-src/ext/reflection/tests/bug48336.phpt --TEST-- Bug #48286 (ReflectionProperty::getDeclaringClass() does not work with redeclared properties) --FILE-- '); try { $rp = new ReflectionProperty($class, 'prop'); print($rp->getDeclaringClass()->getName()); } catch(Exception $e) { print('N/A'); } print("\n"); } ?> --EXPECT-- A => N/A B => B C => C D => C E => C F => F -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/reflection php_reflection.c /ext/reflection/tests bug48336.phpt
lbarnaudThu May 21 16:01:22 2009 UTC Added files: /php-src/ext/reflection/tests bug48336.phpt Modified files: /php-src/ext/reflection php_reflection.c Log: Fixed bug #48336 (ReflectionProperty::getDeclaringClass() does not work with redeclared property) (patch by Markus dot Lidel at shadowconnect dot com) http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/php_reflection.c?r1=1.343&r2=1.344&diff_format=u Index: php-src/ext/reflection/php_reflection.c diff -u php-src/ext/reflection/php_reflection.c:1.343 php-src/ext/reflection/php_reflection.c:1.344 --- php-src/ext/reflection/php_reflection.c:1.343 Mon Apr 27 19:46:02 2009 +++ php-src/ext/reflection/php_reflection.c Thu May 21 16:01:22 2009 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_reflection.c,v 1.343 2009/04/27 19:46:02 felipe Exp $ */ +/* $Id: php_reflection.c,v 1.344 2009/05/21 16:01:22 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -4843,6 +4843,10 @@ break; } ce = tmp_ce; + if (tmp_ce == tmp_info->ce) { + /* declared in this class, done */ + break; + } tmp_ce = tmp_ce->parent; } @@ -5683,7 +5687,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Revision: 1.343 $"); + php_info_print_table_row(2, "Version", "$Revision: 1.344 $"); php_info_print_table_end(); } /* }}} */ @@ -5697,7 +5701,7 @@ NULL, NULL, PHP_MINFO(reflection), - "$Revision: 1.343 $", + "$Revision: 1.344 $", STANDARD_MODULE_PROPERTIES }; /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/reflection/tests/bug48336.phpt?view=markup&rev=1.1 Index: php-src/ext/reflection/tests/bug48336.phpt +++ php-src/ext/reflection/tests/bug48336.phpt --TEST-- Bug #48286 (ReflectionProperty::getDeclaringClass() does not work with redeclared properties) --FILE-- '); try { $rp = new ReflectionProperty($class, 'prop'); print($rp->getDeclaringClass()->getName()); } catch(Exception $e) { print('N/A'); } print("\n"); } ?> --EXPECT-- A => N/A B => B C => C D => C E => C F => F -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard microtime.c
lbarnaudThu May 21 14:21:53 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard microtime.c Log: MFH: set second argument of gettimeofday() to NULL (fixes #48346, patch by adriano at guiadohardware dot net) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/microtime.c?r1=1.53.2.2.2.5&r2=1.53.2.2.2.6&diff_format=u Index: php-src/ext/standard/microtime.c diff -u php-src/ext/standard/microtime.c:1.53.2.2.2.5 php-src/ext/standard/microtime.c:1.53.2.2.2.6 --- php-src/ext/standard/microtime.c:1.53.2.2.2.5 Wed Dec 31 11:17:45 2008 +++ php-src/ext/standard/microtime.cThu May 21 14:21:53 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: microtime.c,v 1.53.2.2.2.5 2008/12/31 11:17:45 sebastian Exp $ */ +/* $Id: microtime.c,v 1.53.2.2.2.6 2009/05/21 14:21:53 lbarnaud Exp $ */ #include "php.h" @@ -54,13 +54,12 @@ { zend_bool get_as_float = 0; struct timeval tp = {0}; - struct timezone tz = {0}; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &get_as_float) == FAILURE) { return; } - if (gettimeofday(&tp, &tz)) { + if (gettimeofday(&tp, NULL)) { RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/standard microtime.c
lbarnaudThu May 21 14:21:40 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard microtime.c Log: MFH: set second argument of gettimeofday() to NULL (fixes #48346, patch by adriano at guiadohardware dot net) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/microtime.c?r1=1.53.2.2.2.3.2.2&r2=1.53.2.2.2.3.2.3&diff_format=u Index: php-src/ext/standard/microtime.c diff -u php-src/ext/standard/microtime.c:1.53.2.2.2.3.2.2 php-src/ext/standard/microtime.c:1.53.2.2.2.3.2.3 --- php-src/ext/standard/microtime.c:1.53.2.2.2.3.2.2 Wed Dec 31 11:15:45 2008 +++ php-src/ext/standard/microtime.cThu May 21 14:21:40 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: microtime.c,v 1.53.2.2.2.3.2.2 2008/12/31 11:15:45 sebastian Exp $ */ +/* $Id: microtime.c,v 1.53.2.2.2.3.2.3 2009/05/21 14:21:40 lbarnaud Exp $ */ #include "php.h" @@ -54,13 +54,12 @@ { zend_bool get_as_float = 0; struct timeval tp = {0}; - struct timezone tz = {0}; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &get_as_float) == FAILURE) { return; } - if (gettimeofday(&tp, &tz)) { + if (gettimeofday(&tp, NULL)) { RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard microtime.c
lbarnaudThu May 21 14:21:19 2009 UTC Modified files: /php-src/ext/standard microtime.c Log: set second argument of gettimeofday() to NULL (fixes #48346, patch by adriano at guiadohardware dot net) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/microtime.c?r1=1.64&r2=1.65&diff_format=u Index: php-src/ext/standard/microtime.c diff -u php-src/ext/standard/microtime.c:1.64 php-src/ext/standard/microtime.c:1.65 --- php-src/ext/standard/microtime.c:1.64 Tue Mar 10 23:39:40 2009 +++ php-src/ext/standard/microtime.cThu May 21 14:21:18 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: microtime.c,v 1.64 2009/03/10 23:39:40 helly Exp $ */ +/* $Id: microtime.c,v 1.65 2009/05/21 14:21:18 lbarnaud Exp $ */ #include "php.h" @@ -54,13 +54,12 @@ { zend_bool get_as_float = 0; struct timeval tp = {0}; - struct timezone tz = {0}; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &get_as_float) == FAILURE) { return; } - if (gettimeofday(&tp, &tz)) { + if (gettimeofday(&tp, NULL)) { RETURN_FALSE; } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) /ext/spl spl_array.c /ext/spl/tests arrayObject_magicMethods6.phpt bug45622b.phpt
lbarnaudThu May 21 13:26:29 2009 UTC Added files: (Branch: PHP_5_2) /php-src/ext/spl/tests bug45622b.phpt Modified files: /php-src/ext/splspl_array.c /php-src/ext/spl/tests arrayObject_magicMethods6.phpt Log: MFH: Better fix for #45622 (patch by robinf at php do net) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.24&r2=1.71.2.17.2.25&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.24 php-src/ext/spl/spl_array.c:1.71.2.17.2.25 --- php-src/ext/spl/spl_array.c:1.71.2.17.2.24 Thu May 14 16:44:54 2009 +++ php-src/ext/spl/spl_array.c Thu May 21 13:26:29 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_array.c,v 1.71.2.17.2.24 2009/05/14 16:44:54 lbarnaud Exp $ */ +/* $Id: spl_array.c,v 1.71.2.17.2.25 2009/05/21 13:26:29 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -671,12 +671,12 @@ { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); - if (std_object_handlers.has_property(object, member, has_set_exists TSRMLS_CC)) { - return 1; - } else if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0) { + if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 + && !std_object_handlers.has_property(object, member, 2 TSRMLS_CC)) { return spl_array_has_dimension(object, member, has_set_exists TSRMLS_CC); } - return 0; + return std_object_handlers.has_property(object, member, has_set_exists TSRMLS_CC); + } /* }}} */ static void spl_array_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{ */ http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/arrayObject_magicMethods6.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/spl/tests/arrayObject_magicMethods6.phpt diff -u php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.2.2 php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.2.3 --- php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.2.2Thu May 14 16:44:54 2009 +++ php-src/ext/spl/tests/arrayObject_magicMethods6.phptThu May 21 13:26:29 2009 @@ -133,11 +133,8 @@ } --> isset existent, non-existent and dynamic: -In UsesMagic::__isset(a) bool(true) -In UsesMagic::__isset(nonexistent) bool(false) -In UsesMagic::__isset(dynamic) bool(true) Original wrapped object: object(C)#%d (5) { http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug45622b.phpt?view=markup&rev=1.1 Index: php-src/ext/spl/tests/bug45622b.phpt +++ php-src/ext/spl/tests/bug45622b.phpt --TEST-- Ensure fix to bug45622 doesn't cause __isset() to be called when ArrayObject::ARRAY_AS_PROPS is used. --FILE-- prop1; echo "Doesn't trigger __set.\n"; $ao->prop2 = 'foo'; echo "Doesn't trigger __unset.\n"; unset($ao->prop3); echo "Shouldn't trigger __isset.\n"; isset($ao->prop4); ?> --EXPECTF-- Doesn't trigger __get. Notice: Undefined index: prop1 in %s on line 11 Doesn't trigger __set. Doesn't trigger __unset. Notice: Undefined index: prop3 in %s on line 17 Shouldn't trigger __isset. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_array.c /ext/spl/tests arrayObject_magicMethods6.phpt bug45622b.phpt
lbarnaudThu May 21 13:26:14 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/spl/tests bug45622b.phpt Modified files: /php-src/ext/splspl_array.c /php-src/ext/spl/tests arrayObject_magicMethods6.phpt Log: MFH: Better fix for #45622 (patch by robinf at php do net) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.17.2.13.2.39&r2=1.71.2.17.2.13.2.40&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.39 php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.40 --- php-src/ext/spl/spl_array.c:1.71.2.17.2.13.2.39 Thu Mar 19 03:01:37 2009 +++ php-src/ext/spl/spl_array.c Thu May 21 13:26:14 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_array.c,v 1.71.2.17.2.13.2.39 2009/03/19 03:01:37 colder Exp $ */ +/* $Id: spl_array.c,v 1.71.2.17.2.13.2.40 2009/05/21 13:26:14 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -745,12 +745,12 @@ { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); - if (std_object_handlers.has_property(object, member, has_set_exists TSRMLS_CC)) { - return 1; - } else if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0) { + if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 + && !std_object_handlers.has_property(object, member, 2 TSRMLS_CC)) { return spl_array_has_dimension(object, member, has_set_exists TSRMLS_CC); } - return 0; + return std_object_handlers.has_property(object, member, has_set_exists TSRMLS_CC); + } /* }}} */ static void spl_array_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{ */ http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/arrayObject_magicMethods6.phpt?r1=1.1.4.2&r2=1.1.4.3&diff_format=u Index: php-src/ext/spl/tests/arrayObject_magicMethods6.phpt diff -u php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.4.2 php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.4.3 --- php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.1.4.2Fri Oct 17 14:34:55 2008 +++ php-src/ext/spl/tests/arrayObject_magicMethods6.phptThu May 21 13:26:14 2009 @@ -143,11 +143,8 @@ } --> isset existent, non-existent and dynamic: -In UsesMagic::__isset(a) bool(true) -In UsesMagic::__isset(nonexistent) bool(false) -In UsesMagic::__isset(dynamic) bool(true) Original wrapped object: object(C)#1 (5) { http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug45622b.phpt?view=markup&rev=1.1 Index: php-src/ext/spl/tests/bug45622b.phpt +++ php-src/ext/spl/tests/bug45622b.phpt --TEST-- Ensure fix to bug45622 doesn't cause __isset() to be called when ArrayObject::ARRAY_AS_PROPS is used. --FILE-- prop1; echo "Doesn't trigger __set.\n"; $ao->prop2 = 'foo'; echo "Doesn't trigger __unset.\n"; unset($ao->prop3); echo "Shouldn't trigger __isset.\n"; isset($ao->prop4); ?> --EXPECTF-- Doesn't trigger __get. Notice: Undefined index: prop1 in %s on line 11 Doesn't trigger __set. Doesn't trigger __unset. Notice: Undefined index: prop3 in %s on line 17 Shouldn't trigger __isset. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/spl spl_array.c /ext/spl/tests arrayObject_magicMethods6.phpt bug45622b.phpt
lbarnaudThu May 21 13:25:48 2009 UTC Added files: /php-src/ext/spl/tests bug45622b.phpt Modified files: /php-src/ext/splspl_array.c /php-src/ext/spl/tests arrayObject_magicMethods6.phpt Log: Better fix for #45622 (patch by robinf at php do net) http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.164&r2=1.165&diff_format=u Index: php-src/ext/spl/spl_array.c diff -u php-src/ext/spl/spl_array.c:1.164 php-src/ext/spl/spl_array.c:1.165 --- php-src/ext/spl/spl_array.c:1.164 Thu Mar 26 20:02:12 2009 +++ php-src/ext/spl/spl_array.c Thu May 21 13:25:48 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_array.c,v 1.164 2009/03/26 20:02:12 felipe Exp $ */ +/* $Id: spl_array.c,v 1.165 2009/05/21 13:25:48 lbarnaud Exp $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -749,12 +749,12 @@ { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); - if (std_object_handlers.has_property(object, member, has_set_exists TSRMLS_CC)) { - return 1; - } else if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0) { + if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 + && !std_object_handlers.has_property(object, member, 2 TSRMLS_CC)) { return spl_array_has_dimension(object, member, has_set_exists TSRMLS_CC); } - return 0; + return std_object_handlers.has_property(object, member, has_set_exists TSRMLS_CC); + } /* }}} */ static void spl_array_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{ */ http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/arrayObject_magicMethods6.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/spl/tests/arrayObject_magicMethods6.phpt diff -u php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.2 php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.3 --- php-src/ext/spl/tests/arrayObject_magicMethods6.phpt:1.2Fri Oct 17 14:40:13 2008 +++ php-src/ext/spl/tests/arrayObject_magicMethods6.phptThu May 21 13:25:48 2009 @@ -143,11 +143,8 @@ } --> isset existent, non-existent and dynamic: -In UsesMagic::__isset(a) bool(true) -In UsesMagic::__isset(nonexistent) bool(false) -In UsesMagic::__isset(dynamic) bool(true) Original wrapped object: object(C)#1 (5) { http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug45622b.phpt?view=markup&rev=1.1 Index: php-src/ext/spl/tests/bug45622b.phpt +++ php-src/ext/spl/tests/bug45622b.phpt --TEST-- Ensure fix to bug45622 doesn't cause __isset() to be called when ArrayObject::ARRAY_AS_PROPS is used. --FILE-- prop1; echo "Doesn't trigger __set.\n"; $ao->prop2 = 'foo'; echo "Doesn't trigger __unset.\n"; unset($ao->prop3); echo "Shouldn't trigger __isset.\n"; isset($ao->prop4); ?> --EXPECTF-- Doesn't trigger __get. Notice: Undefined index: prop1 in %s on line 11 Doesn't trigger __set. Doesn't trigger __unset. Notice: Undefined index: prop3 in %s on line 17 Shouldn't trigger __isset. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/curl interface.c
iliaa Thu May 21 12:53:24 2009 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/curl interface.c /php-srcNEWS Log: MFB: Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out when working with a non-writable stream) http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.49&r2=1.62.2.14.2.50&diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.49 php-src/ext/curl/interface.c:1.62.2.14.2.50 --- php-src/ext/curl/interface.c:1.62.2.14.2.49 Wed May 20 09:26:20 2009 +++ php-src/ext/curl/interface.cThu May 21 12:53:24 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.14.2.49 2009/05/20 09:26:20 tony2001 Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.50 2009/05/21 12:53:24 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -1436,12 +1436,24 @@ error = CURLE_OK; switch (option) { case CURLOPT_FILE: - ch->handlers->write->fp = fp; - ch->handlers->write->method = PHP_CURL_FILE; + if (((php_stream *) what)->mode[0] != 'r') { + ch->handlers->write->fp = fp; + ch->handlers->write->method = PHP_CURL_FILE; + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable"); + RETVAL_FALSE; + return 1; + } break; case CURLOPT_WRITEHEADER: - ch->handlers->write_header->fp = fp; - ch->handlers->write_header->method = PHP_CURL_FILE; + if (((php_stream *) what)->mode[0] != 'r') { + ch->handlers->write_header->fp = fp; + ch->handlers->write_header->method = PHP_CURL_FILE; + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable"); + RETVAL_FALSE; + return 1; + } break; case CURLOPT_INFILE: zend_list_addref(Z_LVAL_PP(zvalue)); http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1515&r2=1.2027.2.547.2.1516&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1515 php-src/NEWS:1.2027.2.547.2.1516 --- php-src/NEWS:1.2027.2.547.2.1515Wed May 20 09:06:31 2009 +++ php-src/NEWSThu May 21 12:53:24 2009 @@ -29,6 +29,8 @@ - Fixed bug #48240 (DBA Segmentation fault dba_nextkey). (Felipe) - Fixed bug #48224 (Incorrect shuffle in array_rand). (Etienne) - Fixed bug #48221 (memory leak when passing invalid xslt parameter). (Felipe) +- Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out when + working with a non-writable stream). (Ilia) - Fixed bug #48206 (Iterating over an invalid data structure with RecursiveIteratorIterator leads to a segfault). (Scott) - Fixed bug #48204 (xmlwriter_open_uri() does not emit warnings on invalid -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/curl interface.c
iliaa Thu May 21 12:52:59 2009 UTC Modified files: /php-src/ext/curl interface.c Log: MFB: Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out when working with a non-writable stream) http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.165&r2=1.166&diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.165 php-src/ext/curl/interface.c:1.166 --- php-src/ext/curl/interface.c:1.165 Wed May 20 09:26:03 2009 +++ php-src/ext/curl/interface.cThu May 21 12:52:59 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.165 2009/05/20 09:26:03 tony2001 Exp $ */ +/* $Id: interface.c,v 1.166 2009/05/21 12:52:59 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -1665,12 +1665,24 @@ error = CURLE_OK; switch (option) { case CURLOPT_FILE: - ch->handlers->write->fp = fp; - ch->handlers->write->method = PHP_CURL_FILE; + if (((php_stream *) what)->mode[0] != 'r') { + ch->handlers->write->fp = fp; + ch->handlers->write->method = PHP_CURL_FILE; + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable"); + RETVAL_FALSE; + return 1; + } break; case CURLOPT_WRITEHEADER: - ch->handlers->write_header->fp = fp; - ch->handlers->write_header->method = PHP_CURL_FILE; + if (((php_stream *) what)->mode[0] != 'r') { + ch->handlers->write_header->fp = fp; + ch->handlers->write_header->method = PHP_CURL_FILE; + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable"); + RETVAL_FALSE; + return 1; + } break; case CURLOPT_INFILE: zend_list_addref(Z_LVAL_PP(zvalue)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_3) /ext/curl interface.c
iliaa Thu May 21 12:52:05 2009 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/curl interface.c Log: Fixed bug #48207 (CURLOPT_(FILE|WRITEHEADER options do not error out when working with a non-writable stream) http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.27.2.48&r2=1.62.2.14.2.27.2.49&diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.27.2.48 php-src/ext/curl/interface.c:1.62.2.14.2.27.2.49 --- php-src/ext/curl/interface.c:1.62.2.14.2.27.2.48Wed May 20 09:26:12 2009 +++ php-src/ext/curl/interface.cThu May 21 12:52:05 2009 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: interface.c,v 1.62.2.14.2.27.2.48 2009/05/20 09:26:12 tony2001 Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.27.2.49 2009/05/21 12:52:05 iliaa Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -1649,12 +1649,24 @@ error = CURLE_OK; switch (option) { case CURLOPT_FILE: - ch->handlers->write->fp = fp; - ch->handlers->write->method = PHP_CURL_FILE; + if (((php_stream *) what)->mode[0] != 'r') { + ch->handlers->write->fp = fp; + ch->handlers->write->method = PHP_CURL_FILE; + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable"); + RETVAL_FALSE; + return 1; + } break; case CURLOPT_WRITEHEADER: - ch->handlers->write_header->fp = fp; - ch->handlers->write_header->method = PHP_CURL_FILE; + if (((php_stream *) what)->mode[0] != 'r') { + ch->handlers->write_header->fp = fp; + ch->handlers->write_header->method = PHP_CURL_FILE; + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "the provided file handle is not writable"); + RETVAL_FALSE; + return 1; + } break; case CURLOPT_INFILE: zend_list_addref(Z_LVAL_PP(zvalue)); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php