From 2ffd4e315faffc8bad2e46422664528d49fd00ab Mon Sep 17 00:00:00 2001 From: Erik Amaru Ortiz Date: Wed, 15 Jan 2014 12:16:46 -0400 Subject: [PATCH] FIXES on Bootstrap and Path classes 1. On bootstrap class, was added static declaration for registerClass() method 2. On Patch class was removed at top the loadClass('system') call, because this make a redeclaration error, in PHP ver 5.3.2x and it was moved into function that use that, now it is just loaded conditionally. --- gulliver/system/class.bootstrap.php | 2 +- workflow/engine/classes/class.patch.php | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php index 2e61e4e44..1a50bb526 100644 --- a/gulliver/system/class.bootstrap.php +++ b/gulliver/system/class.bootstrap.php @@ -30,7 +30,7 @@ class Bootstrap return; } - public function registerClass($classname, $includeFile) + public static function registerClass($classname, $includeFile) { BootStrap::$includeClassPaths[strtolower($classname)] = $includeFile; return; diff --git a/workflow/engine/classes/class.patch.php b/workflow/engine/classes/class.patch.php index ec10a6099..1f8eab0e6 100644 --- a/workflow/engine/classes/class.patch.php +++ b/workflow/engine/classes/class.patch.php @@ -2,7 +2,6 @@ G::LoadClass("Task"); G::LoadClass("TaskUser"); -G::LoadClass("System"); /** * class, helping to set some not desirable settings but necesary @@ -26,6 +25,10 @@ class p11835 extends patch */ static public function isApplicable() { + if (! class_exists('System')) { + G::LoadClass("System"); + } + patch::$isPathchable = false; $con = Propel::getConnection("workflow"); $stmt = $con->prepareStatement("describe TASK;");