Changeset:
        128582afd203
        
https://sourceforge.net/p/mrbs/hg-code/ci/128582afd2031cec12f4195469916e9a631907f6
Author:
        Campbell Morrison <[email protected]>
Date:
        Fri Oct 28 12:41:10 2016 +0100
Log message:

Added some error handling

diffstat:

 web/auth/cms/joomla.inc |  14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r 33f7f9a44ca6 -r 128582afd203 web/auth/cms/joomla.inc
--- a/web/auth/cms/joomla.inc   Fri Oct 28 11:38:44 2016 +0100
+++ b/web/auth/cms/joomla.inc   Fri Oct 28 12:41:10 2016 +0100
@@ -3,8 +3,18 @@
 global $auth;
 
 define('_JEXEC', 1);
-define('JPATH_BASE', realpath(MRBS_ROOT . DS . $auth['joomla']['rel_path']));
- 
+
+$joomla_path = realpath(MRBS_ROOT . DS . $auth['joomla']['rel_path']);
+
+if ($joomla_path === false)
+{
+  $message = MRBS_ROOT . DS . $auth['joomla']['rel_path'] . ' does not exist.  
Check the setting ' .
+             'of $auth["joomla"]["rel_path"] in your config file.';
+  die($message);  // Too early for fatal_error()
+}
+
+define('JPATH_BASE', $joomla_path);
+
 require_once JPATH_BASE . DS . 'includes' . DS . 'defines.php';
 require_once JPATH_BASE . DS . 'includes' . DS . 'framework.php';
 

------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to