dmitry Tue, 23 Nov 2010 10:22:34 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=305685
Log: Fixed bug #35547 (Segfault accessing static method) Bug: http://bugs.php.net/35547 (error getting bug information) Changed paths: A php/php-src/trunk/Zend/tests/bug53347.phpt U php/php-src/trunk/Zend/zend_compile.c Added: php/php-src/trunk/Zend/tests/bug53347.phpt =================================================================== --- php/php-src/trunk/Zend/tests/bug53347.phpt (rev 0) +++ php/php-src/trunk/Zend/tests/bug53347.phpt 2010-11-23 10:22:34 UTC (rev 305685) @@ -0,0 +1,17 @@ +--TEST-- +Bug #53347 Segfault accessing static method +--FILE-- +<?php class ezcConsoleOutput +{ + protected static $color = array( 'gray' => 30 ); + + public static function isValidFormatCode( $type, $key ) + { + return isset( self::${$type}[$key] ); + } +} + +var_dump( ezcConsoleOutput::isValidFormatCode( 'color', 'gray' ) ); +?> +--EXPECT-- +bool(true) Modified: php/php-src/trunk/Zend/zend_compile.c =================================================================== --- php/php-src/trunk/Zend/zend_compile.c 2010-11-23 10:02:14 UTC (rev 305684) +++ php/php-src/trunk/Zend/zend_compile.c 2010-11-23 10:22:34 UTC (rev 305685) @@ -777,7 +777,7 @@ opline_ptr->op2.constant = zend_add_class_name_literal(CG(active_op_array), &class_node.u.constant TSRMLS_CC); } else { - SET_NODE(opline.op2, &class_node); + SET_NODE(opline_ptr->op2, &class_node); } opline_ptr->extended_value |= ZEND_FETCH_STATIC_MEMBER; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php