usage. (Andrey)
- Opcache:
+ . Fixed bug #73746 (Method that returns string returns UNKNOWN:0 instead).
+ (Laruence)
. Fixed bug #73654 (Segmentation fault in zend_call_function). (Nikita)
. Fixed bug #73668 ("SIGFPE Arithmetic exception" in opcache when divide by
minus 1). (Nikita)
}
case ZEND_VERIFY_RETURN_TYPE: {
zend_arg_info *ret_info = op_array->arg_info - 1;
- ZEND_ASSERT((opline + 1)->opcode == ZEND_RETURN || (opline + 1)->opcode == ZEND_RETURN_BY_REF);
if (ret_info->class_name
|| ret_info->type_hint == IS_CALLABLE
|| !ZEND_SAME_FAKE_TYPE(ret_info->type_hint, Z_TYPE_P(val))
return 0;
}
MAKE_NOP(opline);
- opline++;
+ /* zend_handle_loops_and_finally may inserts other oplines */
+ do {
+ ++opline;
+ } while (opline->opcode != ZEND_RETURN && opline->opcode != ZEND_RETURN_BY_REF);
break;
}
default:
--- /dev/null
+--TEST--
+Bug #73746 (Method that returns string returns UNKNOWN:0 instead)
+--FILE--
+<?php
+namespace Core\Bundle\Service\Property\Room\Rooms;
+
+class CountryMapping
+{
+ const CZ = 'CZ';
+ const EN = 'EN';
+
+ public function get(string $countryIsoCode = null) : string // Works correctly if return type is removed
+ {
+ switch (strtoupper($countryIsoCode)) {
+ case 'CZ':
+ case 'SK':
+ return self::CZ; // Works correctly if changed to CountryMapping::CZ
+ default:
+ return self::EN; // Works correctly if changed to CountryMapping::EN
+ }
+ }
+}
+
+$mapping = new CountryMapping();
+var_dump($mapping->get('CZ'));
+?>
+--EXPECT--
+string(2) "CZ"