Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/worker/src/MWP/Monolog/Processo...
File: ExceptionProcessor.php
<?php
[0] Fix | Delete
/*
[1] Fix | Delete
* This file is part of the ManageWP Worker plugin.
[2] Fix | Delete
*
[3] Fix | Delete
* (c) ManageWP LLC <contact@managewp.com>
[4] Fix | Delete
*
[5] Fix | Delete
* For the full copyright and license information, please view the LICENSE
[6] Fix | Delete
* file that was distributed with this source code.
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
class MWP_Monolog_Processor_ExceptionProcessor implements Monolog_Processor_ProcessorInterface
[10] Fix | Delete
{
[11] Fix | Delete
public function callback(array $record)
[12] Fix | Delete
{
[13] Fix | Delete
if (!isset($record['context']['exception']) || !$record['context']['exception'] instanceof Exception) {
[14] Fix | Delete
return $record;
[15] Fix | Delete
}
[16] Fix | Delete
[17] Fix | Delete
/** @var Exception $exception */
[18] Fix | Delete
$exception = $record['context']['exception'];
[19] Fix | Delete
unset($record['context']['exception']);
[20] Fix | Delete
[21] Fix | Delete
$record['file'] = $exception->getFile();
[22] Fix | Delete
$record['line'] = $exception->getLine();
[23] Fix | Delete
[24] Fix | Delete
$record['extra']['exception_class'] = get_class($exception);
[25] Fix | Delete
$record['extra']['exception_message'] = $exception->getMessage();
[26] Fix | Delete
$record['extra']['exception_code'] = $exception->getCode();
[27] Fix | Delete
$record['extra']['exception_trace'] = $exception->getTraceAsString();
[28] Fix | Delete
[29] Fix | Delete
return $record;
[30] Fix | Delete
}
[31] Fix | Delete
}
[32] Fix | Delete
[33] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function