From e34aa50e1321a6912287ba4e938854f4d707d594 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 27 Jun 2005 08:23:22 +0000 Subject: [PATCH] * Removed a comment, "FIXME require in a foreach", require_once() will be evaluated exactly once during execution (it has an effect similar to the static keyword), do demonstrate this behaviour run the code for ($i = 0; $i < 10; ++$i) require("file.txt"); in a directory that has a file called 'file.txt' and then change require() to require_once(); --- includes/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Parser.php b/includes/Parser.php index 435196480c..2dbc4e955e 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -396,7 +396,7 @@ class Parser # gallery $text = Parser::extractTags('gallery', $text, $gallery_content, $uniq_prefix); foreach( $gallery_content as $marker => $content ) { - require_once( 'ImageGallery.php' ); // FIXME require in a foreach ? + require_once( 'ImageGallery.php' ); if ( $render ) { $gallery_content[$marker] = Parser::renderImageGallery( $content ); } else { -- 2.20.1