Skip to content

Commit

Permalink
Improve condition in lessphp lib
Browse files Browse the repository at this point in the history
Library lessphp ( http://leafo.net/lessphp ) version v0.5.0 caused mautic to be flooded with log
messages as described here: (
https://forum.mautic.org/t/log-flooded-with-mautic-notice-php-notice-trying-to-access-array-offset-on-value-of-type-bool-redlining-server/19320/6
), to get rid off the log messages we have strengthen the condition on line that was causing log
messages.
  • Loading branch information
mzagmajster committed Dec 19, 2021
1 parent 5975231 commit 5ec12f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/MauticFocusBundle/Include/lessc.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ protected function zipSetArgs($args, $orderedValues, $keywordValues)

// check for a rest
$last = end($args);
if ('rest' == $last[0]) {
if (is_array($last) && count($last) && 'rest' == $last[0]) {
$rest = array_slice($orderedValues, count($args) - 1);
$this->set($last[1], $this->reduce(['list', ' ', $rest]));
}
Expand Down

0 comments on commit 5ec12f1

Please sign in to comment.