* Removed a comment, "FIXME require in a foreach", require_once() will be
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 27 Jun 2005 08:23:22 +0000 (08:23 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 27 Jun 2005 08:23:22 +0000 (08:23 +0000)
  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

index 4351964..2dbc4e9 100644 (file)
@@ -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 {