I am debugging a Joomla site, using old Joomla 2.5 . On the move to php 5.4 we encountered the widely discussed strict standards errors. Most have been easy to fix. I have one last error that is proving more difficult.
Strict Standards: Declaration of JCacheControllerView::get() should be compatible with JCacheController::get($id, $group = NULL) in /home/XXXXXX/public_testing/libraries/joomla/cache/controller/view.php on line 137
Research shows advice such as this: Declaration of Methods should be Compatible with Parent Methods in PHP
JCacheController defines
public function get($id, $group = null)
JCacheControllerView extends JCacheController and defines:
public function get(&$view, $method, $id = false, $wrkarounds = true)
So I tried changing the declarations to have the same parameters and same default values: JCacheController defines
public function get($id=false, $group = null, &$view = null, $method = null, $wrkarounds = true)
JCacheControllerView extends JCacheController and defines:
public function get(&$view = null, $method = null, $id = false, $wrkarounds = true, $group = null)
Which results in:
Strict Standards: Declaration of JCacheControllerView::get() should be compatible with JCacheController::get($id = false, $group = NULL, &$view = NULL, $method = NULL, $wrkarounds = true) in /home/freedibl/public_testing/libraries/joomla/cache/controller/view.php on line 137
Could this be because the parameters are not in the same order? How could I fix this without altering the original method calls? Both methods are widely used, and it would be difficult to change every call to either one throughout joomla.