From 6ae01284b835bddc0264a2ac4e63f570b9457357 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Sat, 16 Mar 2024 02:44:40 +0700 Subject: [PATCH] [PHP 8.4] Fixes for implicit nullability deprecation Fixes all issues that emit deprecation notices on PHP 8.4 for implicit nullable parameter type declarations. See: - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types) - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated) --- Parsedown.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Parsedown.php b/Parsedown.php index 46974ff..01eb8e2 100644 --- a/Parsedown.php +++ b/Parsedown.php @@ -570,7 +570,7 @@ class Parsedown # # List - protected function blockList($Line, array $CurrentBlock = null) + protected function blockList($Line, ?array $CurrentBlock = null) { list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]{1,9}+[.\)]'); @@ -807,7 +807,7 @@ class Parsedown # # Setext - protected function blockSetextHeader($Line, array $Block = null) + protected function blockSetextHeader($Line, ?array $Block = null) { if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted'])) { @@ -893,7 +893,7 @@ class Parsedown # # Table - protected function blockTable($Line, array $Block = null) + protected function blockTable($Line, ?array $Block = null) { if ( ! isset($Block) or $Block['type'] !== 'Paragraph' or isset($Block['interrupted'])) {