From: Dmitry Stogov Date: Fri, 9 Nov 2007 12:16:55 +0000 (+0000) Subject: Fixed implementation of internal interfaces in namespaces X-Git-Tag: RELEASE_2_0_0a1~1404 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aea2368bda11331a1eacbff5003b601bd0a51d4b;p=php Fixed implementation of internal interfaces in namespaces --- diff --git a/Zend/tests/ns_054.phpt b/Zend/tests/ns_054.phpt new file mode 100755 index 0000000000..0eb9e0448f --- /dev/null +++ b/Zend/tests/ns_054.phpt @@ -0,0 +1,31 @@ +--TEST-- +054: namespace and interfaces +--SKIPIF-- + +--FILE-- +attach($foo); +$foo->update($bar); +?> +--EXPECT-- +ok +ok diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index bd18b97ac1..37d27d7a98 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3349,7 +3349,7 @@ void zend_do_implements_interface(znode *interface_name TSRMLS_DC) /* {{{ */ if (CG(active_op_array)->last > 0) { opline = &CG(active_op_array)->opcodes[CG(active_op_array)->last-1]; if (opline->opcode == ZEND_FETCH_CLASS) { - opline->extended_value = ZEND_FETCH_CLASS_INTERFACE; + opline->extended_value = (opline->extended_value & ~ZEND_FETCH_CLASS_MASK) | ZEND_FETCH_CLASS_INTERFACE; } } break;