mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Merge branch 'PHP-7.2'
* PHP-7.2: Fixed bug #75556 (Invalid opcode 138/1/1)
This commit is contained in:
commit
a84c7050fd
@ -306,6 +306,8 @@ int zend_optimizer_update_op1_const(zend_op_array *op_array,
|
||||
/* This would require a non-local change.
|
||||
* zend_optimizer_replace_by_const() supports this. */
|
||||
return 0;
|
||||
case ZEND_INSTANCEOF:
|
||||
return 0;
|
||||
case ZEND_CASE:
|
||||
case ZEND_FETCH_LIST:
|
||||
return 0;
|
||||
|
26
ext/opcache/tests/bug75556.phpt
Normal file
26
ext/opcache/tests/bug75556.phpt
Normal file
@ -0,0 +1,26 @@
|
||||
--TEST--
|
||||
Bug #75556 (Invalid opcode 138/1/1)
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.optimization_level=-1
|
||||
--SKIPIF--
|
||||
<?php require_once('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
function createFromFormat($format, $date, ?\DateTimeZone $tz = null): ?\DateTimeInterface
|
||||
{
|
||||
if ($tz !== null
|
||||
|| ($tz instanceof \DateTimeZone && !in_array($tz->getName(), ['UTC', 'Z'], true))
|
||||
) {
|
||||
$msg = 'Date objects must have UTC as their timezone';
|
||||
throw new \UnexpectedValueException($msg);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
var_dump(createFromFormat('m/d/Y', '12/07/2017', null));
|
||||
?>
|
||||
--EXPECT--
|
||||
NULL
|
Loading…
Reference in New Issue
Block a user