Marcel
Active member
Using Robbo's xfgamer45's Ad Manager is fine on PHP 5.3, however 5.4 and above it throws a depreciated /e modifier error, just like in this old bug report
https://xenforo.com/community/threads/errors-when-using-debug-mode-beta-4.54046/
The full error text is :
It's a long shot, but is this the function that's causing the issue when it calls the relevant part of the Zend Framework? If so, how do I change it to become compliant?
Any ideas? Thanks in advance.
https://xenforo.com/community/threads/errors-when-using-debug-mode-beta-4.54046/
The full error text is :
An exception occurred: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /Volumes/Data/127/xendev/library/Zend/Filter/PregReplace.php on line 171
- XenForo_Application::handlePhpError()
- preg_replace() in Zend/Filter/PregReplace.php at line 171
- Zend_Filter_PregReplace->filter() in Zend/Filter/Word/SeparatorToCamelCase.php at line 49
- Zend_Filter_Word_SeparatorToCamelCase->filter() in Zend/Filter.php at line 233
- Zend_Filter::filterStatic() in Merc/AdManager/Common/Helper.php at line 79
- Merc_Common_Helper_Version04::underscoreToCamelCase() in Merc/AdManager/Common/Model.php at line 110
- Merc_Common_Model_Version04->__call() in Merc/AdManager/Listener.php at line 71
- Merc_AdManager_Model_Position->getPositions() in Merc/AdManager/Listener.php at line 71
- Merc_AdManager_Listener->getPositions() in Merc/AdManager/Listener.php at line 55
- Merc_AdManager_Listener::frontControllerPreView()
- call_user_func_array() in XenForo/CodeEvent.php at line 90
- XenForo_CodeEvent::fire() in XenForo/FrontController.php at line 156
- XenForo_FrontController->run() in /Volumes/Data/127/xendev/index.php at line 13
Code:
public static function underscoreToCamelCase($string, $lowerCaseFirst = false)
{
$ret = Zend_Filter::filterStatic($string, 'Word_UnderscoreToCamelCase');
return $lowerCaseFirst ? lcfirst($ret) : $ret;
}
It's a long shot, but is this the function that's causing the issue when it calls the relevant part of the Zend Framework? If so, how do I change it to become compliant?
Any ideas? Thanks in advance.