[wp-trac] [WordPress Trac] #28613: class_exists(classname) should be class_exists(classname, false) in a few places
WordPress Trac
noreply at wordpress.org
Sun Jun 22 15:47:05 UTC 2014
#28613: class_exists(classname) should be class_exists(classname, false) in a few
places
----------------------------+-----------------------------
Reporter: jcjcc | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Bootstrap/Load | Version: trunk
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
Five files contain calls to class_exists without the second parameter set
to false. When an autoloader is registered but the class doesn't exist, a
fatal exception is thrown (see #13436) unless this second parameter is
set.
The incorrect calls to "class_exists" (ie. with only one argument) are in
wp-includes/pomo/{entry, translations, streams, mo}.php.
One more instance in wp-includes/pluggable-deprecated.php.
The changes are very simple and should look like this (here is the one
instance in pluggable-deprecated.php):
{{{
if ( ! class_exists( 'wp_atom_server' ) ) {
}}}
becomes
{{{
if ( ! class_exists( 'wp_atom_server', false ) ) {
}}}
#13436 mentions several more instances, but I did the above changes by
hand and the site loads fine now. (It would be probably to go through and
look at every instance of class_exists, though.)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28613>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list