Finder error occurs when search string returns no results

Created on 30 November 2010, almost 14 years ago
Updated 27 February 2023, over 1 year ago

I have three finders - all of them generate the following errors on the page when searching for something that does not exist:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /var/devel/sites/all/modules/finder/finder.module(1625) : eval()'d code on line 1

Parse error: syntax error, unexpected '?' in /var/devel/sites/all/modules/finder/finder.module(1625) : eval()'d code on line 1

Looking at the code I see line 1625 is:

1625 print eval("\?\>". $code);

If I print out the value of $code at that point it says:

There are no results to display

I was able to stop the error with this hack:

1625     if ( preg_match("/^.*There are no results to display.*$/", $code) != 0 ) {
1626       print eval("\?\>". $code);
1627     }else{
1628       print "$code" ;
1629     }
🐛 Bug report
Status

Closed: works as designed

Version

1.8

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024