Fix problem with context parameters and a PHP warning