diff --git a/C4/Context.pm b/C4/Context.pm index 148841397c..4385bff16c 100644 --- a/C4/Context.pm +++ b/C4/Context.pm @@ -956,7 +956,10 @@ sub queryparser { $context->{"queryparser"} = &_new_queryparser(); } - return $context->{"queryparser"}->new; + return + defined( $context->{"queryparser"} ) + ? $context->{"queryparser"}->new + : undef; } =head2 _new_queryparser