# simple-urls/114/libs/Raven/Processor/SanitizeStacktraceProcessor.php

Lasso Lite – Affiliate Link Manager, URL Shortener &amp; Link Tracking, version 114. 40 lines.

- Page: https://pluginprobe.com/plugins/simple-urls/114/code/libs/Raven/Processor/SanitizeStacktraceProcessor.php
- Raw: https://pluginprobe.com/plugins/simple-urls/114/raw/libs/Raven/Processor/SanitizeStacktraceProcessor.php
- Modified: 2022-08-02T03:33:04+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/simple-urls/114/code/libs/Raven/Processor/SanitizeStacktraceProcessor.php#L10-L20`.

```php
<?php

/*
 * This file is part of Raven.
 *
 * (c) Sentry Team
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * This processor removes the `pre_context`, `context_line` and `post_context`
 * informations from all exceptions captured by an event.
 *
 * @author Stefano Arlandini <sarlandini@alice.it>
 */
class Raven_Processor_SanitizeStacktraceProcessor extends Raven_Processor
{
    /**
     * {@inheritdoc}
     */
    public function process(&$data)
    {
        if (!isset($data['exception'], $data['exception']['values'])) {
            return;
        }

        foreach ($data['exception']['values'] as &$exception) {
            if (!isset($exception['stacktrace'])) {
                continue;
            }

            foreach ($exception['stacktrace']['frames'] as &$frame) {
                unset($frame['pre_context'], $frame['context_line'], $frame['post_context']);
            }
        }
    }
}

```
