google-code-export / firephp

Automatically exported from code.google.com/p/firephp
1 stars 0 forks source link

PHP5 class_exists() throws Exception without second parameter #163

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What versions and operating system are you using?

OS: Mac OS X 10.6.5
Firefox: 3.6.13
Firebug: 1.6.0
FirePHP Server Library: 0.3.2
FirePHP Extension: 0.5.0
Developer Companion: 0.0.0master1012210014

What is the problem?

On a PHP5 install of an app using FirePHP, I was getting a fatal uncaught 
exception caused by the class_exists() call on line 45:

if(!class_exists('FirePHP')) {
    require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'FirePHP.class.php';
}

This can be fixed by adding the second parameter to class_exists which prevents 
the function from attempting to autoload the class:

if(!class_exists('FirePHP', FALSE)) {
    require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'FirePHP.class.php';
}

I've attached the file with the fix in place. I can't see a problem with this 
fix since you explicitly require the file on the next line.

What steps will reproduce the problem?
1. Using Media Temple (dv) with PHP5
2. To see the error message, turn error reporting all the way up

Original issue reported on code.google.com by nategree...@hotmail.com on 4 Jan 2011 at 2:58

Attachments:

GoogleCodeExporter commented 9 years ago
I screwed this up two ways:

1. I posted under a friend's account. This account is the correct one.

2. I attached a file that had the second parameter set to TRUE instead of 
FALSE. I've attached an updated file.

Original comment by jasonate...@gmail.com on 4 Jan 2011 at 4:02

Attachments:

GoogleCodeExporter commented 9 years ago
Committed: 
https://github.com/cadorn/firephp-libs/commit/db9cedfe48c5916c27c93e3103108a3a8a
50c21a

Original comment by christ...@christophdorn.com on 4 Jan 2011 at 9:03