NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[fixed] Bug when mixing include and include_once
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Imagine the following 2 files:

functions.inc.php:
Code:
<?php
   function TestFunction ( ) { echo 'Blah'; }
?>


test.php:
Code:
<?php
   include ( 'functions.inc.php' );
   include_once ( 'functions.inc.php' );

   TestFunction ( );
?>


(sue me for creativity Wink)

Without PHPExpress you get "Blah" as expected.
If you run this example with PHPExpress:

PHP Fatal error: Failed to load cached file (functions.inc.php)
function testfunction is already declared in test.php on line 4


This is obviously a condensed example, but some of the sites I host actually work like this, using a normal collection-file with a set of "include"'s in there and then include_once further along the script. Since PHP itself does not make a problem out of it, shouldn't that also be true for PHPExpress?
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8334
Reply with quote
thanks for the report. Fix will be available with version 1.4.2 in next few days,
meanwhile all customers are welcome with their requests to get this version right now Exclamation
http://shop.nusphere.com/contact_us/

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[fixed] Bug when mixing include and include_once
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic