Skip to content

Commit 23ee464

Browse files
committed
Fix Psalm PossiblyUndefinedIntArrayOffset in replaceAriaLabelWithPlaceholder
1 parent d80025c commit 23ee464

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ContactsEncoder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,9 @@ private function handleAriaLabelContent($content, $reverse = false)
926926
*/
927927
private function replaceAriaLabelWithPlaceholder($matches)
928928
{
929+
if (!isset($matches[0])) {
930+
return '';
931+
}
929932
$original = $matches[0];
930933
$placeholder = 'ct_temp_aria_' . $this->aria_index++;
931934
$this->aria_placeholders[$placeholder] = $original;

0 commit comments

Comments
 (0)