fix: add null check for $input

This commit is contained in:
alistair3149 2022-04-19 13:59:27 -04:00
parent f3858fa198
commit 51893d8b9d

View file

@ -42,6 +42,9 @@ class TabberNeueHooks {
*/
public static function renderTabber( $input, array $args, Parser $parser, PPFrame $frame ) {
$parser->getOutput()->addModules( [ 'ext.tabberNeue' ] );
if ( is_null( $input ) ) {
return;
}
$arr = explode( "|-|", $input );
$htmlTabs = '';
foreach ( $arr as $tab ) {
@ -94,6 +97,9 @@ class TabberNeueHooks {
$parser->getOutput()->addModules( [ 'ext.tabberNeue' ] );
$selected = true;
if ( is_null( $input ) ) {
return;
}
$arr = explode( "\n", $input );
$htmlTabs = '';
foreach ( $arr as $tab ) {