Make function raiseError compatible with PHP 5.4