From 9e66d5e916e7bc5cf3f8ad0b84fac7fa8dec3812 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 21 Aug 2009 21:43:20 +0000 Subject: [PATCH] Error fixed in BaseHelper --- inc/classes/main/helper/class_BaseHelper.php | 2 +- .../main/resolver/command/class_BaseCommandResolver.php | 2 +- .../resolver/command/web/class_WebCommandResolver.php | 8 +------- inc/classes/main/template/class_BaseTemplateEngine.php | 2 +- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/inc/classes/main/helper/class_BaseHelper.php b/inc/classes/main/helper/class_BaseHelper.php index c9e9b068..0489e073 100644 --- a/inc/classes/main/helper/class_BaseHelper.php +++ b/inc/classes/main/helper/class_BaseHelper.php @@ -441,7 +441,7 @@ class BaseHelper extends BaseFrameworkSystem { */ public function getValueField ($fieldName) { // Get the field value - $fieldValue = call_user_func_array(array($this->valueInstance, 'getField'), array($fieldName)); + $fieldValue = call_user_func_array($this->valueInstance->__toString() . '::getField', array($fieldName)); // Return it return $fieldValue; diff --git a/inc/classes/main/resolver/command/class_BaseCommandResolver.php b/inc/classes/main/resolver/command/class_BaseCommandResolver.php index fa19bbb5..2d664d96 100644 --- a/inc/classes/main/resolver/command/class_BaseCommandResolver.php +++ b/inc/classes/main/resolver/command/class_BaseCommandResolver.php @@ -99,7 +99,7 @@ class BaseCommandResolver extends BaseResolver { } // END - if // Create the full class name - $className = $this->commandPrefix . $this->convertToClassName($commandName) . 'Command'; + $className = $this->getCommandPrefix() . $this->convertToClassName($commandName) . 'Command'; // Now, let us create the full name of the command class $this->setClassName($className); diff --git a/inc/classes/main/resolver/command/web/class_WebCommandResolver.php b/inc/classes/main/resolver/command/web/class_WebCommandResolver.php index 0e5e65de..e020350d 100644 --- a/inc/classes/main/resolver/command/web/class_WebCommandResolver.php +++ b/inc/classes/main/resolver/command/web/class_WebCommandResolver.php @@ -131,7 +131,7 @@ class WebCommandResolver extends BaseCommandResolver implements CommandResolver if ($this->isCommandValid($commandName) === false) { // This command is invalid! throw new InvalidCommandException(array($this, $commandName), self::EXCEPTION_INVALID_COMMAND); - } + } // END - if // Get the command $commandInstance = $this->loadCommand($commandName); @@ -152,12 +152,6 @@ class WebCommandResolver extends BaseCommandResolver implements CommandResolver // Init command instance $commandInstance = null; - // Create class name - $className = $this->getCommandPrefix() . $this->convertToClassName($commandName) . 'Command'; - - // Create command class name - $this->setClassName($className); - // Is this class loaded? if (!class_exists($this->getClassName())) { // Class not found, so throw an exception diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index 79981fb6..e94894d4 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -1320,7 +1320,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { // Now parse the XML tree if (!xml_parse($xmlParser, $content)) { // Error found in XML! - //die('
'.htmlentities($content).'
'); + //* DEBUG: */ die('
'.htmlentities($content).'
'); throw new XmlParserException(array($this, $xmlParser), BaseHelper::EXCEPTION_XML_PARSER_ERROR); } // END - if -- 2.39.5