OpenX – PHP 5.4.34 Upgrade Error Fix

If your OpenX installation is printing-out the following:

Strict Standards: Non-static method PEAR::setErrorHandling() should not be called statically in /home/user/directory/lib/Max.php on line 222

Strict Standards: Non-static method OA::debug() should not be called statically, assuming $this from incompatible context in /home/user/directory/lib/max/ErrorHandler.php on line 134

Strict Standards: Non-static method Log::singleton() should not be called statically, assuming $this from incompatible context in /home/user/directory/lib/OA.php on line 158

Strict Standards: Non-static method Log::factory() should not be called statically, assuming $this from incompatible context in /home/user/directory/lib/pear/Log.php on line 199

Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in /home/user/directory/lib/OA.php on line 165

Strict Standards: Non-static method OX_Admin_Timezones::getTimezone() should not be called statically, assuming $this from incompatible context in /home/user/directory/lib/OA.php on line 198

It is most likely due a PHP upgrade which changes how an error class is OpenX is called. Luckily there is a quick fix.
In the file /lib/Max.php on line 222 it will read:
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'pearErrorHandler');
Just change that line to the following:
//PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'pearErrorHandler');
$MDFIXPEAR = new PEAR();
$MDFIXPEAR->setErrorHandling(PEAR_ERROR_CALLBACK, 'pearErrorHandler');

After uploading the Max.php file your OpenX installation should be back to normal.