Please change all issues of:

if (count($data['text'])) {

to:

if (!empty($data['text'])) {

You have a situation where $data['text'] may or may not be defined!
Notes: the given $data['text'] is only for code illustration purposes!

The code here also has several issues with 'Notice: Undefined variable'

I shall cover those later!

Peter

Comments

shafter’s picture

Can you specify the line number at all occurrences, where this piece of code can be found?

roczei’s picture

Assigned: Unassigned » roczei

Dear Peter,

Thanks for your report. Could you please send a patch?

Cheers,

Gabor

roczei’s picture

Assigned: roczei » Unassigned