phplist

NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1


View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015301phplist applicationMessage Send Processpublic03-06-09 02:3819-05-15 17:23
Reporterdanjfoley 
PrioritynormalSeverityminorReproducibilitysometimes
StatusresolvedResolutionfixed 
PlatformOSOS Version
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.

example:

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

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

-  Notes
(0050713)
h2b2 (manager)
25-08-09 05:49

Possibly related to this forum thread, which also involves the cleanCommaList() function: http://forums.phplist.com/viewtopic.php?f=17&t=25007 [^]

mdclayton provided a fix in this post: http://forums.phplist.com/viewtopic.php?p=63264#p63264 [^]

====== 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 ======


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker