fixed test to run on mac os x (PHP_OS is set to „Darwin“ there)
Added custom error if error_get_last() does not return anything.