Skip to content

Commit 47f34f4

Browse files
committed
Less_Parser: Fix "ord(): Providing an empty string is deprecated" PHP 8.5 warning
Bug: T411397 Change-Id: I7cebc53ac0a3952575bdee4231f27136baa5d187
1 parent b5cca5e commit 47f34f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/Less/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ private function parseEntitiesDimension() {
15821582
static $CHARCODE_FORWARD_SLASH = 47;
15831583
static $CHARCODE_PLUS = 43;
15841584
static $CHARCODE_9 = 57;
1585-
$c = ord( $this->input[$this->pos] ?? '' );
1585+
$c = isset( $this->input[$this->pos] ) ? ord( $this->input[$this->pos] ) : 0;
15861586
// Is the first char of the dimension 0-9, '.', '+' or '-'
15871587
$peekNotNumeric = ( $c > $CHARCODE_9 || $c < $CHARCODE_PLUS ) || $c === $CHARCODE_FORWARD_SLASH || $c === $CHARCODE_COMMA;
15881588

0 commit comments

Comments
 (0)