From 965ed0ca7f5e07dc6d7d7e08ad8215b7c1c63b83 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Tue, 04 Jan 2011 17:13:43 -0500
Subject: [PATCH] Silently ignore unknown classes in rcube_autoload (#1487109)
---
CHANGELOG | 1 +
program/include/iniset.php | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 17a6563..652ac2b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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)
diff --git a/program/include/iniset.php b/program/include/iniset.php
index 5ef067f..b5ca1a8 100755
--- a/program/include/iniset.php
+++ b/program/include/iniset.php
@@ -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');
--
Gitblit v1.9.1