Skip to content

Commit

Permalink
[PHP 8.4] Fixes for implicit nullability deprecation
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Ayesh authored and xabbuh committed Jul 9, 2024
1 parent 87b57bf commit 6ae0128
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Parsedown.php
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ protected function blockHeader($Line)
#
# 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}+[.\)]');

Expand Down Expand Up @@ -807,7 +807,7 @@ protected function blockRule($Line)
#
# 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']))
{
Expand Down Expand Up @@ -893,7 +893,7 @@ protected function blockReference($Line)
#
# 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']))
{
Expand Down

0 comments on commit 6ae0128

Please sign in to comment.