serendipity_event_entrypaging

Creating and modifying plugins.
Post Reply
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

serendipity_event_entrypaging

Post by JWalker »

Hi,

I've just looked in my Apache's error.log and saw this:

Code: Select all

[Tue Nov 13 21:05:12 2007] [error] [client 192.168.20.178] PHP Warning:  mb_stristr() [<a href='function.mb-stristr'>function.mb-stristr</a>]: Empty delimiter. in D:\\biz\\apps\\serendipity\\plugins\\serendipity_event_entrypaging\\serendipity_event_entrypaging.php on line 142, referer: http://walker/sblog/
I don't know what is the cause of this warning, my blog looks OK. May be this is a pointer to something [bad] in that plugin.

Additional information:

Code: Select all

if ($event == 'css') {
    if (stristr('.serendipity_entrypaging', $addData)) { // <<<<<<<<<< 142 line
// class exists in CSS, so a user has customized it and we don't need default
        return true;
    }
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: serendipity_event_entrypaging

Post by garvinhicking »

Hi!

Seems your server has hardcoded mbstring overloading enabled. This is a thing that s9y can't really check for, and it seems that mb_stristr that overloads stristr() has a different syntax argument list.

Which PHP version are you using? You might need to update that, or disable the mbstring hard overloading (which might have a side effect on applications other than s9y on your server!)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post by JWalker »

Hi,

My configuration is : Apache 2.0.61 (Win32) / DAV/2 SVN 1.4.5 / PHP 5.2.4

From php.ini

Code: Select all

[mbstring]
; language for internal character representation.
;mbstring.language = Japanese

; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
;mbstring.internal_encoding = EUC-JP

; http input encoding.
;mbstring.http_input = auto

; http output encoding. mb_output_handler must be
; registered as output buffer to function
;mbstring.http_output = SJIS

; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
;       portable libs/applications.
;mbstring.encoding_translation = Off

; automatic encoding detection order.
; auto means
;mbstring.detect_order = auto

; substitute_character used when character cannot be converted
; one from another
;mbstring.substitute_character = none;

; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
mbstring.func_overload = 7

; enable strict encoding detection.
;mbstring.strict_encoding = Off
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
mbstring.func_overload = 0
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
JWalker
Regular
Posts: 177
Joined: Mon Sep 12, 2005 4:14 pm
Location: Botevgrad, Bulgaria
Contact:

Post by JWalker »

It works. The message did not appear anymore. :)
Ivan Cenov
OKTO-7 Co., Botevgrad
Bulgaria
Post Reply