Skip to content

Commit f3e71b3

Browse files
nikiccmb69
authored andcommitted
Fixed bug #78297
(cherry picked from commit 8a19fe2)
1 parent 0ed5c4a commit f3e71b3

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
?? ??? ????, PHP 7.3.8
4+
5+
- Phpdbg:
6+
. Fixed bug #78297 (Include unexistent file memory leak). (Nikita)
7+
38
18 Jul 2019, PHP 7.3.8RC1
49

510
- Core:

sapi/phpdbg/phpdbg_list.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
248248
} else {
249249
zend_message_dispatcher(ZMSG_FAILED_INCLUDE_FOPEN, file->filename);
250250
}
251+
return NULL;
251252
}
252253

253254
data.buf = estrndup(bufptr, len);

sapi/phpdbg/tests/bug78297.phpt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
--TEST--
2+
Bug #78297: Include unexistent file memory leak
3+
--PHPDBG--
4+
r
5+
q
6+
--FILE--
7+
<?php
8+
include "does_not_exist.php";
9+
--EXPECTF--
10+
[Successful compilation of %s]
11+
prompt>
12+
Warning: include(%s): failed to open stream: No such file or directory in %s on line %d
13+
14+
Warning: include(): Failed opening 'does_not_exist.php' for inclusion (include_path=%s) in %s on line %d
15+
[Script ended normally]
16+
prompt>

0 commit comments

Comments
 (0)