View Issue Details

IDProjectCategoryView StatusLast Update
0018829phpList 3 applicationGeneralpublic13-02-19 12:28
Reporterduncanc Assigned To 
Status resolvedResolutionfixed 
Product Version3.3.1 
Target Version3.3.2Fixed in Version3.3.2 
Summary0018829: Lists tab shows extra lists as checked, php 7.1 incompatibility
DescriptionInvestigating a problem where the Lists tab of a campaign displayed extra, non-selected lists as checked, I found what looks to be a backward-incompatible change in php 7.1.

In function loadMessageData() the 'targetlist' entry is initialised to an empty string but later is accessed as an array:

        'targetlist' => '',

    while ($lst = Sql_fetch_array($result)) {
        $messagedata['targetlist'][$lst['id']] = 1;

In php up to and including php 7.0 the first indexed assignment changes the array element 'targetlist' from a string to an array. But in php 7.1 the array element 'targetlist' remains as a string with string indexing being used to change an individual character within the string.

See a simple example at
TagsNo tags attached.



19-08-17 08:51

updater   ~0059326

Last edited: 19-08-17 08:51

View 2 revisions

Seems to be a reported php bug (not the new behaviour but that is a non-documented backward-compatibility break).