Conditions | 8 |
Paths | 6 |
Total Lines | 32 |
Code Lines | 22 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
42 | public function handle_preprocess(Doku_Event $event, $param) |
||
1 ignored issue
–
show
|
|||
43 | { |
||
44 | global $TEXT, $INPUT; |
||
45 | if ($INPUT->server->str('REQUEST_METHOD') !== 'POST' |
||
46 | || !in_array($event->data, ['save', 'preview']) |
||
47 | || !$INPUT->post->has('prosemirror_json') |
||
48 | ) { |
||
49 | return; |
||
50 | } |
||
51 | |||
52 | $unparsedJSON = $INPUT->post->str('prosemirror_json'); |
||
53 | if (json_decode($unparsedJSON, true) === null) { |
||
54 | msg('Error decoding prosemirror data', -1); |
||
1 ignored issue
–
show
|
|||
55 | return; |
||
56 | } |
||
57 | try { |
||
58 | $rootNode = SyntaxTreeBuilder::parseJsonIntoTree($unparsedJSON); |
||
59 | } catch (Throwable $e) { |
||
60 | $errorMsg = 'Parsing the data provided by the WYSIWYG editor failed with message: ' . hsc($e->getMessage()); |
||
1 ignored issue
–
show
|
|||
61 | /** @var helper_plugin_sentry $sentry */ |
||
62 | $sentry = plugin_load('helper', 'sentry'); |
||
1 ignored issue
–
show
|
|||
63 | if ($sentry) { |
||
64 | $sentry->logException($e); |
||
65 | $errorMsg .= ' Error has been logged to Sentry.'; |
||
66 | } |
||
67 | |||
68 | msg($errorMsg, -1); |
||
69 | return; |
||
70 | } |
||
71 | $syntax = $rootNode->toSyntax(); |
||
72 | if (!empty($syntax)) { |
||
73 | $TEXT = $syntax; |
||
74 | } |
||
79 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths