View Issue Details

IDProjectCategoryView StatusLast Update
0015182phpList 3 applicationCampaign Send Processpublic19-05-15 17:23
ReporterCS2 Assigned To 
Status resolvedResolutionfixed 
Product Version2.10.5 
Target Version2.10.10Fixed in Version2.10.10 
Summary0015182: Error 1064 when using stacked attribute selection
DescriptionUsing Firefox 3.03, I received consistent Database error 1064 messages, and when showing the IDs of the attributes I selected, there would always be ", " in front of the leading attribute ID.
Additional InformationI tracked it down to the first attribute in the "criteria_values" array always being a null value. I modified the code as follows to correct the error in send_core.php:

    if (is_array($_POST["criteria_values"])) {
      $values = join(", ",$_POST["criteria_values"]);
    } else {
      $values = $_POST["criteria_values"];

    if (is_array($_POST["criteria_values"])) {
      # The following code checks for null values in the criteria_attribute array and removes them
      $values = $_POST["criteria_values"];
      foreach ($values as $key=>$value) {
          if (!$value) {
             array_splice($values, $key, 1); // Remove null value from array
      $values = join(", ",$values);
    # $values = join(", ",$_POST["criteria_values"]);
    } else {
      $values = $_POST["criteria_values"];
TagsNo tags attached.


related to 0015301 resolvedmichiel function UserAttributeValue will end up with no value in $val_ids[0] causing sql command to fail 
related to 0015454 resolvedmichiel database error 1064 when stacking attributes in 2.10.12 


01-10-08 22:57


send_core.php (65,929 bytes)


24-02-09 16:34

reporter   ~0050526


I can confirm this exists in 2.10.9 as well, and that fix also works.

I believe the real solution should be to find the actual cause of null value at the beginning of values array. Looks like it might have something to do with Javascript.

PHPList 2.10.9
Firefox 3.0.6
PHP 5.2.8
MySQL 5.0.45