Skip to content

Commit b6294bb

Browse files
committed
Fixed assertion on phpMyAdmin-4.7.5 home page
1 parent 466a34d commit b6294bb

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ PHP NEWS
1616
. Fixed bug #75434 (Wrong reflection for mysqli_fetch_all function). (Fabien
1717
Villepinte)
1818

19+
- Opcache:
20+
. Fixed assertion on phpMyAdmin-4.7.5 home page. (Dmitry)
21+
1922
- SOAP:
2023
. Fixed bug #75464 (Wrong reflection on SoapClient::__setSoapHeaders). (villfa)
2124

ext/opcache/Optimizer/zend_ssa.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,11 @@ static inline void zend_ssa_remove_phi_source(zend_ssa *ssa, zend_ssa_phi *phi,
12791279
for (j = 0; j < predecessors_count; j++) {
12801280
if (phi->sources[j] == var_num) {
12811281
if (j < pred_offset) {
1282-
ZEND_ASSERT(phi->use_chains[pred_offset] == NULL);
1282+
if (next_phi == NULL) {
1283+
next_phi = phi->use_chains[pred_offset];
1284+
} else {
1285+
ZEND_ASSERT(phi->use_chains[pred_offset] == NULL);
1286+
}
12831287
} else if (j >= pred_offset) {
12841288
phi->use_chains[j] = next_phi;
12851289
}

ext/opcache/tests/ssa_bug_010.phpt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--TEST--
2+
Wrong assertion
3+
--FILE--
4+
<?php
5+
function foo($parts, $a, $b) {
6+
$name = $a;
7+
$level = 1;
8+
foreach ($parts as $part) {
9+
if ($level == 1) {
10+
$level = 4;
11+
$found = true;
12+
switch ($part) {
13+
case 'general':
14+
break;
15+
case 'bg':
16+
$name = $b;
17+
break;
18+
}
19+
if ($found) {
20+
continue;
21+
}
22+
}
23+
if ($level == 2) {
24+
continue;
25+
}
26+
}
27+
return $name;
28+
}
29+
?>
30+
OK
31+
--EXPECT--
32+
OK

0 commit comments

Comments
 (0)