From e1686c3c6cfc60b2aa4f46cd14fc45fca5fd4534 Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Thu, 2 Dec 2021 22:21:09 -0800 Subject: [PATCH] Cast attr to string to prevent a PHP deprecation warning in 8.1 --- Michelf/MarkdownExtra.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Michelf/MarkdownExtra.php b/Michelf/MarkdownExtra.php index 060a4ae..7fdbdbf 100644 --- a/Michelf/MarkdownExtra.php +++ b/Michelf/MarkdownExtra.php @@ -229,7 +229,7 @@ protected function doExtraAttributes($tag_name, $attr, $defaultIdValue = null, $ } // Split on components - preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', $attr, $matches); + preg_match_all('/[#.a-z][-_:a-zA-Z0-9=]+/', (string)$attr, $matches); $elements = $matches[0]; // Handle classes and IDs (only first ID taken into account)