Skip to content

Commit a18064f

Browse files
authored
Update RTLCSS.php
There is no check to see if $parts is an array with more than one element. So, line 358 can execute and generate a PHP notice.
1 parent 3a6b3f2 commit a18064f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MoodleHQ/RTLCSS/RTLCSS.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ protected function processTransformOrigin(Rule $rule) {
354354

355355
$value = $parts[0];
356356
// The first value may be referencing top or bottom (y instead of x).
357-
if (!is_object($value) && preg_match('/top|bottom/i', $value)) {
357+
if (!is_object($value) && preg_match('/top|bottom/i', $value) && count($parts)>1) {
358358
$value = $parts[1];
359359
}
360360

0 commit comments

Comments
 (0)