Skip to content

Commit

Permalink
Provide default for parse_str to avoid error message with no URL query
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Dec 11, 2024
1 parent 3322e27 commit 57f387c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/frontend/pages/search.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

{capture name="searchFormUrl"}{url escape=false}{/capture}
{assign var=formUrlParameters value=[]}{* Prevent Smarty warning *}
{$smarty.capture.searchFormUrl|parse_url:$smarty.const.PHP_URL_QUERY|parse_str:$formUrlParameters}
{$smarty.capture.searchFormUrl|parse_url:$smarty.const.PHP_URL_QUERY|default:""|parse_str:$formUrlParameters}
<form class="cmp_form" method="get" action="{$smarty.capture.searchFormUrl|strtok:"?"|escape}">
{foreach from=$formUrlParameters key=paramKey item=paramValue}
<input type="hidden" name="{$paramKey|escape}" value="{$paramValue|escape}"/>
Expand Down

0 comments on commit 57f387c

Please sign in to comment.