diff --git a/com_ccex/site/ccex.php b/com_ccex/site/ccex.php index 3136e97..3120ddc 100644 --- a/com_ccex/site/ccex.php +++ b/com_ccex/site/ccex.php @@ -2,7 +2,7 @@ // No direct access ini_set('display_errors', true); -error_reporting(E_ALL); +error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED); defined('_JEXEC') or die('Restricted access'); //sessions diff --git a/com_ccex/site/helpers/cast.php b/com_ccex/site/helpers/cast.php index 9e8c447..a5b671b 100644 --- a/com_ccex/site/helpers/cast.php +++ b/com_ccex/site/helpers/cast.php @@ -13,7 +13,7 @@ class CCExHelpersCast * @param object $sourceObject * @return object */ - function cast($destination, $sourceObject) { + static function cast($destination, $sourceObject) { if (is_string($destination)) { $destination = new $destination(); } diff --git a/com_ccex/site/helpers/style.php b/com_ccex/site/helpers/style.php index 4301677..72b404d 100644 --- a/com_ccex/site/helpers/style.php +++ b/com_ccex/site/helpers/style.php @@ -5,7 +5,7 @@ class CCExHelpersStyle { - function load() { + static function load() { $document = JFactory::getDocument(); //javascripts diff --git a/com_ccex/site/helpers/tag.php b/com_ccex/site/helpers/tag.php index b2f2594..70a2c12 100644 --- a/com_ccex/site/helpers/tag.php +++ b/com_ccex/site/helpers/tag.php @@ -5,7 +5,7 @@ class CCExHelpersTag { - function formatCurrency($value) { + static function formatCurrency($value) { if ($value < 0.01 || $value > 99999999) { return sprintf('%.2e', $value); } else if (is_float($value)) { @@ -15,15 +15,15 @@ function formatCurrency($value) { } } - function formatCurrencyWithSymbol($value, $symbol) { + static function formatCurrencyWithSymbol($value, $symbol) { return sprintf('%s%s', $symbol, CCExHelpersTag::formatCurrency($value)); } - function formatWithSymbol($value, $symbol) { + static function formatWithSymbol($value, $symbol) { return sprintf('%s%s', $symbol, $value); } - function formatBoolean($boolean) { + static function formatBoolean($boolean) { if ($boolean) { return "Yes"; } else { diff --git a/com_ccex/site/helpers/view.php b/com_ccex/site/helpers/view.php index ce533da..0bf7a96 100644 --- a/com_ccex/site/helpers/view.php +++ b/com_ccex/site/helpers/view.php @@ -5,7 +5,7 @@ class CCExHelpersView { - function load($viewName, $layoutName = 'default', $viewFormat = 'html', $vars = null) { + static function load($viewName, $layoutName = 'default', $viewFormat = 'html', $vars = null) { // Get the application $app = JFactory::getApplication(); @@ -36,7 +36,7 @@ function load($viewName, $layoutName = 'default', $viewFormat = 'html', $vars = return $view; } - function getHtml($view, $layout, $item, $data) { + static function getHtml($view, $layout, $item, $data) { $objectView = CCExHelpersView::load($view, $layout, 'phtml'); $objectView->$item = $data; diff --git a/com_ccex/site/models/collection.php b/com_ccex/site/models/collection.php index 5252649..495d941 100644 --- a/com_ccex/site/models/collection.php +++ b/com_ccex/site/models/collection.php @@ -229,7 +229,8 @@ public function intervalsWithoutLast() { } public function lastInterval() { - return CCExHelpersCast::cast('CCExModelsInterval', end($this->intervals())); + $intervals = $this->intervals(); + return CCExHelpersCast::cast('CCExModelsInterval', end($intervals)); } public function newInterval() {