Skip to content

Commit 8a19fe2

Browse files
committed
Fixed bug #78297
1 parent c903742 commit 8a19fe2

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2019, PHP 7.2.22
44

5+
- Phpdbg:
6+
. Fixed bug #78297 (Include unexistent file memory leak). (Nikita)
57

68
01 Aug 2019, PHP 7.2.21
79

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)