[Svn] r4394 - in trunk/roundcubemail: . program/include

trac at roundcube.net trac at roundcube.net
Tue Jan 4 23:13:43 CET 2011


Author: thomasb
Date: 2011-01-04 16:13:43 -0600 (Tue, 04 Jan 2011)
New Revision: 4394

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/include/iniset.php
Log:
Silently ignore unknown classes in rcube_autoload (#1487109)

Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2011-01-04 22:00:35 UTC (rev 4393)
+++ trunk/roundcubemail/CHANGELOG	2011-01-04 22:13:43 UTC (rev 4394)
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Make rcube_autoload silently skip unknown classes (#1487109)
 - Fix charset detection in vcards with encoded values (#1485542)
 - Better CSS cursors for splitters (#1486874)
 - Show the same message only once (#1487641)

Modified: trunk/roundcubemail/program/include/iniset.php
===================================================================
--- trunk/roundcubemail/program/include/iniset.php	2011-01-04 22:00:35 UTC (rev 4393)
+++ trunk/roundcubemail/program/include/iniset.php	2011-01-04 22:13:43 UTC (rev 4394)
@@ -105,7 +105,14 @@
         ),
         $classname
     );
-    include $filename. '.php';
+
+    if ($fp = @fopen("$filename.php", 'r', true)) {
+        fclose($fp);
+        include_once("$filename.php");
+        return true;
+    }
+
+    return false;
 }
 
 spl_autoload_register('rcube_autoload');

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list