r14514 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14513‎ | r14514 | r14515 >
Date:08:02, 1 June 2006
Author:midom
Status:old
Tags:
Comment:
fix class_exists() for not existing classes
Modified paths:
  • /trunk/phase3/includes/AutoLoader.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/AutoLoader.php
@@ -213,7 +213,11 @@
214214 'memcached' => 'memcached-client.php',
215215 'UtfNormal' => 'normal/UtfNormal.php'
216216 );
217 - require($classes[$class_name]);
 217+ if (array_key_exists($class_name, $classes)) {
 218+ require($classes[$class_name]);
 219+ } else {
 220+ return false;
 221+ }
218222 }
219223
220224 ?>
\ No newline at end of file

Status & tagging log