Repository navigation
v2.3.2
What's Changed
fix: SQLite compatibility — MOD() → %, positional ORDER BY after UNION
SQLite does not support the MOD() function and requires positional (or
unambiguous) column references in ORDER BY clauses that follow a UNION.
Both changes are fully backward-compatible with MySQL and PostgreSQL.
classes/eztagsobject.php — line 729
-$customConds .= " AND eztags.main_language_id + MOD( eztags.language_mask, 2 ) = eztags_keyword.language_id ";
+$customConds .= " AND eztags.main_language_id + (eztags.language_mask % 2) = eztags_keyword.language_id ";datatypes/eztags/eztags.php — lines 255 & 259
- eztags.main_language_id + MOD( eztags.language_mask, 2 ) = eztags_keyword.language_id AND
+ eztags.main_language_id + (eztags.language_mask % 2) = eztags_keyword.language_id AND- ORDER BY priority ASC, id ASC" );
+ ORDER BY 5 ASC, 1 ASC" );Why positional
ORDER BY? SQLite treats bare column names likepriority
andidas ambiguous when they appear in anORDER BYafter aUNION
(it cannot tell which side of the union to resolve against). Using positional
indices (5=priority,1=id) is unambiguous and is valid SQL-92
accepted by MySQL, PostgreSQL, and SQLite alike.
Full Changelog: v2.3.1...v2.3.2