- Fixed potential problems with unserializing invalid serialize data. (Marcus)
- Fixed bug #30967 (properties in extended mysqli classes don't work). (Georg)
- Fixed bug #30962 (mssql returns space for NULL columns). (Ilia)
+- Fixed bug #30922 (reflective functions crash PHP when interfaces extend
+ themselves). (Tony, Dmitry)
- Fixed bug #30890 (MySQLi testsuite)
- Fixed bug #30856 (ReflectionClass::getStaticProperties segfaults). (Marcus)
- Fixed bug #30832 ("!" stripped off comments in xml parser). (Rob)
--- /dev/null
+--TEST--
+Bug #30922 (reflective functions crash PHP when interfaces extend themselves)
+--FILE--
+<?php
+interface RecurisiveFooFar extends RecurisiveFooFar {}
+class A implements RecurisiveFooFar {}
+
+$a = new A();
+var_dump($a instanceOf A);
+echo "ok\n";
+?>
+--EXPECTF--
+Fatal error: Interface RecurisiveFooFar cannot not implement itself in %sbug30922.php on line %d
if (!(ce->ce_flags & ZEND_ACC_INTERFACE) && iface->interface_gets_implemented && iface->interface_gets_implemented(iface, ce TSRMLS_CC) == FAILURE) {
zend_error(E_CORE_ERROR, "Class %s could not implement interface %s", ce->name, iface->name);
}
+ if (ce == iface) {
+ zend_error(E_ERROR, "Interface %s cannot not implement itself", ce->name);
+ }
}