From 17434bda2bae9ace32aab17dc34f5c7a93241e24 Mon Sep 17 00:00:00 2001 From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com> Date: Mon, 18 Jul 2022 12:11:46 +0200 Subject: [PATCH] Check for `null` parameter in the `addcslashes` call. --- templates/parts/markdown-hook.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/parts/markdown-hook.php b/templates/parts/markdown-hook.php index 70001e4..7089de5 100644 --- a/templates/parts/markdown-hook.php +++ b/templates/parts/markdown-hook.php @@ -36,14 +36,15 @@ echo '-------- | ---- | -----------', $eol; foreach ( $arguments as $argument ) { - $type = $argument->get_type(); + $type = $argument->get_type(); + $description = $argument->get_description(); \printf( '%s | %s | %s', \sprintf( '`%s`', $argument->get_name() ), empty( $type ) ? '' : \sprintf( '`%s`', \addcslashes( $type, '|' ) ), strtr( - \addcslashes( $argument->get_description(), '|' ), + ( null === $description ) ? '' : \addcslashes( $description, '|' ), array( "\r\n" => '
', "\r" => '
',