serializer). (Dmitry)
- Fixed bug #31465 (False warning in unpack() when working with *). (Ilia)
- Fixed bug #31363 (broken non-blocking flock()). ian at snork dot net
+- Fixed bug #30961 (Wrong linenumber in ReflectionClass getStartLine()).
+ (Dmitry)
- Fixed bug #30889 (Conflict between __get/__set and ++ operator). (Dmitry)
- Fixed bug #30833 (array_count_values() modifying input array). (Tony)
- Fixed bug #30819 (Better support for LDAP SASL bind). (Jani)
zend_initialize_class_data(new_class_entry, 1 TSRMLS_CC);
new_class_entry->filename = zend_get_compiled_filename(TSRMLS_C);
- new_class_entry->line_start = zend_get_compiled_lineno(TSRMLS_C);
- new_class_entry->ce_flags |= class_token->u.constant.value.lval;
+ new_class_entry->line_start = class_token->u.opline_num;
+ new_class_entry->ce_flags |= class_token->u.EA.type;
if (parent_class_name && parent_class_name->op_type != IS_UNUSED) {
doing_inheritance = 1;
class_entry_type:
- T_CLASS { $$.u.constant.value.lval = 0; }
- | T_ABSTRACT T_CLASS { $$.u.constant.value.lval = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
- | T_FINAL T_CLASS { $$.u.constant.value.lval = ZEND_ACC_FINAL_CLASS; }
+ T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = 0; }
+ | T_ABSTRACT T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = ZEND_ACC_EXPLICIT_ABSTRACT_CLASS; }
+ | T_FINAL T_CLASS { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = ZEND_ACC_FINAL_CLASS; }
;
extends_from:
;
interface_entry:
- T_INTERFACE { $$.u.constant.value.lval = ZEND_ACC_INTERFACE; }
+ T_INTERFACE { $$.u.opline_num = CG(zend_lineno); $$.u.EA.type = ZEND_ACC_INTERFACE; }
;
interface_extends_list:
--- /dev/null
+--TEST--
+Bug #30961 (Wrong linenumber in ReflectionClass getStartLine())
+--FILE--
+<?
+ class a
+ {
+ }
+
+ class b extends a
+ {
+ }
+
+ $ref1 = new ReflectionClass('a');
+ $ref2 = new ReflectionClass('b');
+ echo $ref1->getStartLine() . "\n";
+ echo $ref2->getStartLine() . "\n";
+?>
+--EXPECT--
+2
+6