Skip to content

Commit 2e580da

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #75850: Unclear error message wrt. __halt_compiler() w/o semicolon
2 parents 1850785 + 61ed904 commit 2e580da

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ PHP NEWS
1010
. Fixed bug #80634 (write_property handler of internal classes is skipped on
1111
preloaded JITted code). (Dmitry)
1212

13+
- Phar:
14+
. Fixed bug #75850 (Unclear error message wrt. __halt_compiler() w/o
15+
semicolon) (cmb)
16+
1317
21 Jan 2021, PHP 8.0.2
1418

1519
- Core:

ext/phar/phar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2652,7 +2652,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, zend_long len, int conv
26522652
}
26532653
php_stream_close(newfile);
26542654
if (error) {
2655-
spprintf(error, 0, "illegal stub for phar \"%s\"", phar->fname);
2655+
spprintf(error, 0, "illegal stub for phar \"%s\" (__HALT_COMPILER(); is missing)", phar->fname);
26562656
}
26572657
if (free_user_stub) {
26582658
zend_string_free(suser_stub);

ext/phar/tests/phar_stub_error.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ __HALT_COMPILER();
4747
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
4848
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
4949
bool(true)
50-
Exception: illegal stub for phar "%sphar_stub_error.phar.php"
50+
Exception: illegal stub for phar "%sphar_stub_error.phar.php" (__HALT_COMPILER(); is missing)
5151
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"
5252
bool(true)
5353
string(48) "<?php echo "first stub\n"; __HALT_COMPILER(); ?>"

0 commit comments

Comments
 (0)