We have to destroy (un-opened) ZEND_HANDLE_FILENAMEs.
- Core:
. Fixed bug #78434 (Generator yields no items after valid() call). (Nikita)
. Fixed bug #79477 (casting object into array creates references). (Nikita)
+ . Fixed bug #79514 (Memory leaks while including unexistent file). (cmb,
+ Nikita)
- DOM:
. Fixed bug #78221 (DOMNode::normalize() doesn't remove empty text nodes).
--- /dev/null
+--TEST--
+Bug #79514 (Memory leaks while including unexistent file)
+--FILE--
+<?php
+$mem1 = memory_get_usage(true);
+for ($i = 0; $i < 100000; $i++) {
+ @include __DIR__ . '/bug79514.doesnotexist';
+}
+$mem2 = memory_get_usage(true);
+var_dump($mem2 - $mem1 < 100000);
+?>
+--EXPECT--
+bool(true)
return 0;
}
switch (fh1->type) {
+ case ZEND_HANDLE_FILENAME:
+ return strcmp(fh1->filename, fh2->filename) == 0;
case ZEND_HANDLE_FP:
return fh1->handle.fp == fh2->handle.fp;
case ZEND_HANDLE_STREAM: