Ignore:
Timestamp:
May 24, 2010, 1:14:54 PM (14 years ago)
Author:
plg
Message:

merge r6321 from branch 2.1 to trunk

bug 1682: r6312 was producing a MySQL error (depending on the MySQL server
version) because a count() implies a group by.

This code change was checked against MySQL 5.0.75, MySQL 5.0.51 (where the
error occured) and SQLite 3.6.22.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/include

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • trunk/include/functions_user.inc.php

    r6316 r6322  
    302302    LEFT JOIN '.THEMES_TABLE.' AS t ON t.id = ui.theme
    303303  WHERE ui.user_id = \''.$user_id.'\'
     304  GROUP BY ui.user_id
    304305;';
    305306  $result = pwg_query($query);
    306307  $user_infos_row = pwg_db_fetch_assoc($result);
    307   if (0 == $user_infos_row['counter']) {
     308  if (!isset($user_infos_row['counter']) or 0 == $user_infos_row['counter']) {
    308309    create_user_infos($user_id);
    309310   
Note: See TracChangeset for help on using the changeset viewer.