Jump to content

WIKI - code error


AnthonyH

Recommended Posts

Hello,

 

I am having trouble with my wiki and it keeps giving me an error that I just can't find and it's driving me nutz! Can someone look at this and see the problem?

 

Parse error: syntax error, unexpected T_FUNCTION, expecting T_VARIABLE in /home/revo/public_html/members/wiki/includes/AutoLoader.php on line 587

 

Here is the line along with a few previous and prior lines of the actual code - line 578-560:

# Make an absolute path, this improves performance by avoiding some stat calls

if ( substr( $filename, 0, 1 ) != '/' && substr( $filename, 1, 1 ) != ':' ) {

global $IP;

$filename = "$IP/$filename";

}{

require( $filename );

return true;

}

 

static function loadAllExtensions( $className ) {

global $wgAutoloadClasses, $wgAutoloadClasses;

}

foreach( $wgAutoloadClasses as $class => $file ) {

if( !( class_exists( $class, false ) || interface_exists( $class, false ) ) ) {

require( $file );

}

}

}

}

 

function wfLoadAllExtensions() {

AutoLoader::loadAllExtensions();

}

 

if ( function_exists( 'spl_autoload_register' ) ) {

spl_autoload_register( array( 'AutoLoader', 'autoload' ) );

} else {

function __autoload( $class ) {

AutoLoader::autoload( $class );

}

}

?>

 

 

The actual line that has the error is:

static function loadAllExtensions( $className ) {

 

Best Regards,

Anthony

Link to comment
Share on other sites

In you first if statement. After you end the if statement you forgot to add "else" after

 

HUH???

 

 

OK, after careful consideration, I followed you.  Your post needs to be clear and concise in order to help someone.

 

Fugix is talking about here:

# Make an absolute path, this improves performance by avoiding some stat calls
      if ( substr( $filename, 0, 1 ) != '/' && substr( $filename, 1, 1 ) != ':' ) {
         global $IP;
         $filename = "$IP/$filename";
      }{ //<-missed your 'else' between the brackets.
      require( $filename );
      return true;
   }

Link to comment
Share on other sites

Thank you both!

 

Now that is fixed I get another error:

 

Fatal error: Class 'WebRequest' not found in /home/revo/public_html/members/wiki/includes/Setup.php on line 156

 

Here is the code along the lines 154-156:

$wgIP = false; # Load on demand

# Can't stub this one, it sets up $_GET and $_REQUEST in its constructor

$wgRequest = new WebRequest;

 

Your help is truly appreciated!

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.