View Issue Details

IDProjectCategoryView StatusLast Update
0015301phpList 3 applicationCampaign Send Processpublic19-05-15 17:23
Reporterdanjfoley Assigned To 
Status resolvedResolutionfixed 
Product Version2.10.10 
Target Version2.10.12Fixed in Version2.10.12 
Summary0015301: function UserAttributeValue will end up with no value in $val_ids[0] causing sql command to fail
Descriptionfunction UserAttributeValue in file commonlib/lib/userlib.php

line 245:

$val_ids[0] = cleanCommaList($val_ids[0]);

at times $val_ids[0] will have one value in it.. and after the run of cleanCommaList $val_ids[0] will be empty.

Thus causing the resulting SQL in this function that expects there to be a values in val_ids[0] to fail.
Additional Informationin a run of 1132 users seems to only happen my 30 or so times. I have traced it down to failing here.

I have output the value before and after the cleanCommaList.


before: $val_ids[0] = "32"
after: $val_ids[0] = "";
TagsNo tags attached.


related to 0015182 resolvedmichiel Error 1064 when using stacked attribute selection 
related to 0015454 resolvedmichiel database error 1064 when stacking attributes in 2.10.12 



25-08-09 05:49

manager   ~0050713

Possibly related to this forum thread, which also involves the cleanCommaList() function:

mdclayton provided a fix in this post:

====== Start quote ======

Version 2.10.10 has a new function called cleanCommaList() in connect.php. This is to remove null values in the attributes array, but it apparently doesn't work. Taking code from an earlier patch (bug 15182), replace the existing cleanCommaList function (line 1131 in connect.php) with this:

    #function cleanCommaList($list) {
    # return join(',',cleanArray(split(',',$list)));

    function cleanCommaList($list) {
       foreach ($list as $key=>$value) {
          if(!$value) {
             array_splice($list, $key, 1); //Remove null value from array
      return $list;

Did this and no more errors of any kind. I don't know how the bug reporting system works here, but if this is useful it should be passed along.

===== End Quote ======