I’m doing a tutorial on joomla module, but I’m getting a strict standard error with PHP.
Error:
Strict standards: Non-static method modReviewsHelper::getReviews()
should not be called statically in
C:\wamp\www\Joomla_2.5\modules\mod_reviews\mod_reviews.php on line 7
Call Stack
mod_reviews.php
<?php
defined('_JEXEC')or die('Restricted access here?');
require_once(dirname(__FILE__).DS.'helper.php');
$reviews = modReviewsHelper::getReviews($params);
require(JModuleHelper::getLayoutPath('mod_reviews'));
?>
helper.php
<?php
class modReviewsHelper{
function getReviews( $params ){
return 'I am a happy user!';
}
}
?>
tmpl/default.php
<?php
defined('_JEXEC')or die('Restricted access here?');
echo $reviews;
?>
How do I fix this and to make sure that this does not happen in the future?
1 Answer