From: pieczar92 at interia dot pl
Operating system: Windows 8
PHP version: 5.4.17
Package: PHP options/info functions
Bug Type: Bug
Bug description:PHP Version: 5.4.16
Description:
------------
Welcome.
My report is related to the function:
bool class_exists (string $ class_name [, bool $ autoload = true])
Namely, I have noticed that if the result of the function returns false,
the
script crashes mistake, because after all, the script tries to load a non-
existent class. Problem solved by changing the parameter $ autoload to
false.
I believe that the $ autoload should be taken into account only if the
result of
the function will amount to true.
I'm sorry for syntax errors. My text was translated Google tools -
translation.
Regards,
Kamil Piechaczek
Test script:
---------------
if( class_exists('finfo', false) ) {
$fInfo = new finfo(FILEINFO_MIME);
$gravatarImageMime = $fInfo->file($gravatarURL, FILEINFO_MIME_TYPE);
} else {
$gravatarImage = getimagesize($gravatarURL);
$gravatarImageMime = $gravatarImage['mime'];
}
Expected result:
----------------
Variable $gravatarImageMime should has type mime of file.
Actual result:
--------------
White screen (autoload can't find file)
--
Edit bug report at https://bugs.php.net/bug.php?id=65443&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=65443&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=65443&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=65443&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65443&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65443&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65443&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65443&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65443&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65443&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65443&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=65443&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=65443&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65443&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65443&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65443&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65443&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65443&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65443&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65443&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65443&r=mysqlcfg