Problem in a ThemeForest with the search form after updating PHP

I updated my PHP from 5.6 to 7.3 and now, I notice that my Backstreet search form does’nt work anymore.

ERROR MESSAGE : Parse error: syntax error, unexpected ‘new’ (T_NEW) in /home/clients/606a22bdd061cefb78e7d06f93487c8c/web/wp-content/themes/Backstreet/search.php on line 3

How can I fix that ? here is my url : http://www.fringuesdeseries.com the search form widget is on the top of the right side

(no answer from the author from 1 month)

Txs,

please can you share the code of line 3 ?

<?php get_header(); $allsearch = &new WP_Query("s=$s&showposts=-1"); $key = esc_html($s, 1); $count = $allsearch->post_count; ?>

line 3 in search.php is : $allsearch = &new WP_Query(“s=$s&showposts=-1”);

replace the code (please keep a backup) with the following:

$allsearch = new WP_Query("s=$s&showposts=-1");

Hope will help.

Thanks

1 Like

and now the search engine seems working perfectly !!
Thanks a lot !!!

1 Like