public function testGetFatals() { $errors = fpErrorNotifierErrorCode::getFatals(); $this->assertType('array', $errors); $this->assertEquals(5, count($errors)); $this->assertContains(fpErrorNotifierErrorCode::E_CORE_ERROR, $errors); }
/** * * @return void */ public function handleFatalError() { $error = error_get_last(); $skipHandling = !$error || !isset($error['type']) || !in_array($error['type'], fpErrorNotifierErrorCode::getFatals()); if ($skipHandling) return; $this->freeMemory(); @$this->handleError($error['type'], $error['message'], $error['file'], $error['line']); // $sfE = new sfException(); // $sfE->setWrappedException($error); // $sfE->printStackTrace(); }
/** * * @return void */ public function handleFatalError() { $error = error_get_last(); $skipHandling = !$error || !isset($error['type']) || !in_array($error['type'], fpErrorNotifierErrorCode::getFatals()); if ($skipHandling) { return; } $this->freeMemory(); @$this->handleError($error['type'], $error['message'], $error['file'], $error['line']); }
/** * * @return bool */ public function handleFatalError() { $this->freeMemory(); $error = error_get_last(); $error = array_merge(array('type' => null, 'message' => null, 'file' => null, 'line' => null), (array) $error); if (!in_array($error['type'], fpErrorNotifierErrorCode::getFatals())) { return false; } $this->handleError($error['type'], $error['message'], $error['file'], $error['line']); return true; }