public static function report_php_error($errno, $errstr, $errfile, $errline) { if (self::$instance != null) { self::$instance->report_php_error($errno, $errstr, $errfile, $errline); } return false; }
/** * Report an error to the rollbar. * * @param int $level * @param string $message * @param string $file * @param int $line * @param \Symfony\Component\HttpFoundation\Request $request * @return bool */ public function reportError($level, $message, $file, $line, Request $request = null) { if (error_reporting() & $level && $this->errorLevel & $level && true === $this->reportDecisionManager->decide(new ErrorException($message, 0, $level, $file, $line))) { $this->prepareGlobalServer($request); $this->rollbarNotifier->report_php_error($level, $message, $file, $line); $this->cleanGlobalServer(); } }
public function testErrorWithoutCaptureBacktrace() { $config = self::$simpleConfig; $config['capture_error_backtraces'] = false; $notifier = new RollbarNotifier($config); $uuid = $notifier->report_php_error(E_WARNING, 'Some warning', 'the_file.php', 2); $this->assertValidUUID($uuid); }