Page 2 of 2

Re: XH 1.6.6: search function fails

Posted: Wed Jul 01, 2015 11:16 am
by Holger
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'))

Re: XH 1.6.6: search function fails

Posted: Wed Jul 01, 2015 11:37 am
by cmb
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.

Re: XH 1.6.6: search function fails

Posted: Wed Jul 01, 2015 11:48 am
by Holger
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

Re: XH 1.6.6: search function fails

Posted: Wed Jul 01, 2015 12:16 pm
by cmb
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.

Re: XH 1.6.6: search function fails

Posted: Wed Jul 01, 2015 7:11 pm
by Holger
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.

Re: XH 1.6.6: search function fails

Posted: Wed Jul 01, 2015 11:32 pm
by kurtm
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

Re: XH 1.6.6: search function fails

Posted: Thu Jul 02, 2015 6:04 am
by Holger
Thanks for reporting back.
I've put it on the roadmap for 1.6.8.

Re: XH 1.6.6: search function fails

Posted: Sun Dec 11, 2016 4:31 pm
by cmb
FTR: Fixed with r1682.