[php-src] master: Merge branch 'PHP-8.6'
| From: | ndossche | Date: | Sun, 01 Nov 2026 16:30:31 +0000 |
| Subject: | [php-src] master: Merge branch 'PHP-8.6' | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143169@lists.php.net to get a copy of this message | ||
Author: ndossche (ndossche)
Date: 2026-11-01T17:30:22+01:00
Commit: https://github.com/php/php-src/commit/a29d00b051c666251d9e2b51159fcce79b3ff33c
Raw diff: https://github.com/php/php-src/commit/a29d00b051c666251d9e2b51159fcce79b3ff33c.diff
Merge branch 'PHP-8.6'
* PHP-8.6:
Fix opcache phar check
Changed paths:
M ext/opcache/ZendAccelerator.c
M ext/opcache/tests/issue0149.phpt
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 9c5a25c9227b..7ea59be43821 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -1541,10 +1541,10 @@ static void zend_accel_add_key(zend_string *key, zend_accel_hash_entry
*bucket)
}
}
+/* Must perform the same check as phar_compile_file(). */
static zend_always_inline bool is_phar_file(const zend_string *filename)
{
- return filename &&
- zend_string_ends_with_literal(filename, ".phar") &&
+ return filename && strstr(ZSTR_VAL(filename), ".phar") &&
!strstr(ZSTR_VAL(filename), "://");
}
diff --git a/ext/opcache/tests/issue0149.phpt b/ext/opcache/tests/issue0149.phpt
index 29e6f02808a7..20fe7636ff08 100644
--- a/ext/opcache/tests/issue0149.phpt
+++ b/ext/opcache/tests/issue0149.phpt
@@ -22,7 +22,7 @@ unset($p);
include "php_cli_server.inc";
-$ini = '-d opcache.enable=1 -d opcache.enable_cli=1';
+$ini = '-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.file_update_protection=0';
if (file_exists(ini_get('extension_dir').'/phar.'.PHP_SHLIB_SUFFIX)) {
$ini .= ' -d extension=phar.'.PHP_SHLIB_SUFFIX;
}