View Issue Details

IDProjectCategoryView StatusLast Update
0018829phplist applicationOtherpublic21-08-17 23:05
Reporterduncanc 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.3.1 
Target VersionFixed 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 https://3v4l.org/rglNv
TagsNo tags attached.

Activities

duncanc

19-08-17 09:51

developer   ~0059326

Last edited: 19-08-17 09:51

View 2 revisions

Seems to be a reported php bug https://bugs.php.net/bug.php?id=73925 (not the new behaviour but that is a non-documented backward-compatibility break).