[php-src] master: [skip ci] Fix warning in tests when JIT is disabled at compile time
Ilija Tovilo <[email protected]> Sat, 25 Jul 2026 09:06:20 +0000
| Newsgroups | gmane.comp.php.cvs.general |
|---|---|
| Message-ID | <[email protected]> |
Author: Ilija Tovilo (iluuu1994)
Date: 2026-07-25T11:05:14+02:00
Commit: https://github.com/php/php-src/commit/b70e95de89a8d68df9a862f2c376792bd776fda7
Raw diff: https://github.com/php/php-src/commit/b70e95de89a8d68df9a862f2c376792bd776fda7.diff
[skip ci] Fix warning in tests when JIT is disabled at compile time
Changed paths:
M ext/opcache/tests/jit/gh14267_001.phpt
M ext/opcache/tests/jit/gh16393.phpt
Diff:
diff --git a/ext/opcache/tests/jit/gh14267_001.phpt b/ext/opcache/tests/jit/gh14267_001.phpt
index 2e23016f899b..671923785717 100644
--- a/ext/opcache/tests/jit/gh14267_001.phpt
+++ b/ext/opcache/tests/jit/gh14267_001.phpt
@@ -10,7 +10,7 @@ opcache
--FILE--
<?php
// Skip when JIT was completely disabled at runtime.
-if (($status = opcache_get_status()) === false || $status['jit']['enabled']) {
+if (($status = opcache_get_status()) === false || ($status['jit']['enabled'] ?? true)) {
ini_set('opcache.jit', 'tracing');
}
?>
diff --git a/ext/opcache/tests/jit/gh16393.phpt b/ext/opcache/tests/jit/gh16393.phpt
index e90fb53e21a2..23b79b8fd7d1 100644
--- a/ext/opcache/tests/jit/gh16393.phpt
+++ b/ext/opcache/tests/jit/gh16393.phpt
@@ -8,7 +8,7 @@ opcache.jit_buffer_size=64M
--FILE--
<?php
// Skip when JIT was completely disabled at runtime.
-if (($status = opcache_get_status()) === false || $status['jit']['enabled']) {
+if (($status = opcache_get_status()) === false || ($status['jit']['enabled'] ?? true)) {
ini_set('opcache.jit', 'tracing');
}
class Test {