Skip to content

Commit a8e0a62

Browse files
committed
fix file with zero size usage in phpize mode
1 parent 2dff153 commit a8e0a62

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

win32/build/phpize.js.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ function ERROR(msg)
4040

4141
function file_get_contents(filename)
4242
{
43+
var t = "";
4344
var F = FSO.OpenTextFile(filename, 1);
44-
var t = F.ReadAll();
45-
F.Close();
45+
46+
if (!F.AtEndOfStream) {
47+
t = F.ReadAll();
48+
F.Close();
49+
}
4650
return t;
4751
}
4852

0 commit comments

Comments
 (0)