Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.1

Bug #21097 PHP Warning: Illegal string offset 'attr' or 'text'
Submitted: 2016-07-06 08:51 UTC
From: creator Assigned:
Status: Open Package: HTML_QuickForm_advmultiselect (version 1.5.1)
PHP Version: 5.5.9-1 OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 38 + 47 = ?

 
 [2016-07-06 08:51 UTC] creator (Stefano Coletta)
Description: ------------ When $data['attr'] or $data['text'] is used in the class code it throws the PHP Warning: Illegal string offset 'attr' or 'text'. This behaviour started after upgrading from PHP 5.2 to PHP 5.5.x. Test script: --------------- Any use of the class generates the warning. Expected result: ---------------- No warning as in PHP 5.2 Actual result: -------------- PHP Warning: Illegal string offset 'attr' or 'text'

Comments

 [2016-07-06 08:55 UTC] creator (Stefano Coletta)
To fix it just replace: $data['attr'] with (isset($data['attr']) ? $data['attr'] : '') and $data['text'] with (isset($data['text']) ? $data['text'] : '') in lines 807, 808, 821 and 822.
 [2016-07-06 09:03 UTC] creator (Stefano Coletta)
 [2016-07-06 09:09 UTC] creator (Stefano Coletta)
-PHP Version: 5.5.19 +PHP Version: 5.5.1
 [2016-07-06 09:09 UTC] creator (Stefano Coletta)
-PHP Version: 5.5.1 +PHP Version: 5.5.9-1