XH 1.6.6: search function fails

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Holger
Site Admin
Posts: 3212
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: XH 1.6.6: search function fails

Post by Holger » Wed Jul 01, 2015 11:16 am

cmb wrote:It seems to me that is a bug in some PHP versions (which one do you use?), and we may have to offer some workaround.
Yes, it seems you're right. When searching the web there are a lot of reports about that issue together with some PHP 5.3.x versions.

A more strict and maybe even working replacement could be:

Code: Select all

if (class_exists('Normalizer') && method_exists('Normalizer', 'normalize'))

cmb
Posts: 13345
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: XH 1.6.6: search function fails

Post by cmb » Wed Jul 01, 2015 11:37 am

Holger wrote:Yes, it seems you're right. When searching the web there are a lot of reports about that issue together with some PHP 5.3.x versions.
I can't find anything. Can you please point me to some or tell me some appropriate search words?
Holger wrote:

Code: Select all

if (class_exists('Normalizer') && method_exists('Normalizer', 'normalize'))
Yes, that's better. Thanks.
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3212
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: XH 1.6.6: search function fails

Post by Holger » Wed Jul 01, 2015 11:48 am

cmb wrote:I can't find anything. Can you please point me to some or tell me some appropriate search words?
Of course.
Search - string: "php method_exists bug",
and then clicking around in the results, for example
https://github.com/Kunena/Kunena-1.6/issues/249

cmb
Posts: 13345
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: XH 1.6.6: search function fails

Post by cmb » Wed Jul 01, 2015 12:16 pm

Ah, interesting. I thought that method_exists() would have returned true here, but actually there's a segfault what explains the missing debug information. I've found a report in the PHP tracker, and the problem might be related to the Zend Guard Loader.

Anyway, if we can avoid the issue by simply adding a check for class_exists(), I suggest we do so.
Christoph M. Becker – Plugins for CMSimple_XH

Holger
Site Admin
Posts: 3212
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: XH 1.6.6: search function fails

Post by Holger » Wed Jul 01, 2015 7:11 pm

cmb wrote:Anyway, if we can avoid the issue by simply adding a check for class_exists(), I suggest we do so.
Yes, I agree, a simple check for class_exists() should be enough in this case.

kurtm
Posts: 50
Joined: Tue Sep 03, 2013 12:29 am
Location: New Zealand

Re: XH 1.6.6: search function fails

Post by kurtm » Wed Jul 01, 2015 11:32 pm

Hi Christoph,

I made the change that you mentioned and it has fixed the search issue. (method_exists to class_exists )
All works as expected now.

Many thanks, I'll call off my hosting provider techies now.

Have fun!
KurtM

Holger
Site Admin
Posts: 3212
Joined: Mon May 19, 2008 7:10 pm
Location: Hessen, Germany
Contact:

Re: XH 1.6.6: search function fails

Post by Holger » Thu Jul 02, 2015 6:04 am

Thanks for reporting back.
I've put it on the roadmap for 1.6.8.

cmb
Posts: 13345
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: XH 1.6.6: search function fails

Post by cmb » Sun Dec 11, 2016 4:31 pm

FTR: Fixed with r1682.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply