summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2021-01-25 18:48:35 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2021-01-25 18:49:22 +0100
commit2e580da28ebebb35eefd084dc5a0cdbc94872ff4 (patch)
treed40774e91f7e77c17f5a3840f854b6626c1de06f
parent18507853cb727361ea09fca8a7e4458b9262b145 (diff)
parent61ed904cecbfd2eb6e5c39c22de3c215a2aee722 (diff)
downloadphp-git-2e580da28ebebb35eefd084dc5a0cdbc94872ff4.tar.gz
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #75850: Unclear error message wrt. __halt_compiler() w/o semicolon
-rw-r--r--NEWS4
-rw-r--r--ext/phar/phar.c2
-rw-r--r--ext/phar/tests/phar_stub_error.phpt2
3 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index efc7378f74..c5691d40e3 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,10 @@ PHP NEWS
. Fixed bug #80634 (write_property handler of internal classes is skipped on
preloaded JITted code). (Dmitry)
+- Phar:
+ . Fixed bug #75850 (Unclear error message wrt. __halt_compiler() w/o
+ semicolon) (cmb)
+
21 Jan 2021, PHP 8.0.2
- Core:
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 6434a75a75..cb410f57d2 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -2652,7 +2652,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
}
php_stream_close(newfile);
if (error) {
- spprintf(error, 0, "illegal stub for phar \"%s\"", phar->fname);
+ spprintf(error, 0, "illegal stub for phar \"%s\" (__HALT_COMPILER(); is missing)", phar->fname);
}
if (free_user_stub) {
zend_string_free(suser_stub);
diff --git a/ext/phar/tests/phar_stub_error.phpt b/ext/phar/tests/phar_stub_error.phpt
index 972af851ee..f56f30fece 100644
--- a/ext/phar/tests/phar_stub_error.phpt
+++ b/ext/phar/tests/phar_stub_error.phpt
@@ -47,7 +47,7 @@ __HALT_COMPILER();
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
bool(true)
-Exception: illegal stub for phar "%sphar_stub_error.phar.php"
+Exception: illegal stub for phar "%sphar_stub_error.phar.php" (__HALT_COMPILER(); is missing)
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
bool(true)
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"