Author Topic: [1.7.9] DB Error: Bad SQL Query: INSERT INTO 4images_wordmatch (image_id, ...  (Read 21215 times)

0 Members and 1 Guest are viewing this topic.

Offline kai

  • Administrator
  • Addicted member
  • *****
  • Posts: 1.423
    • View Profile
    • 4images - Image Gallery Management System
If you upload an image which has the same words in title, description and keywords you can get a "DB Error: Bad SQL Query: INSERT INTO 4images_wordmatch (image_id, ..." message.

To fix this:

in includes/search_utils.php

FIND:
array_walk($split_words'trim_value');

and REPLACE WITH:
$split_words array_map('trim'$split_words);
$split_words array_map('strip_tags'$split_words);
$split_words array_map('convert_special'$split_words);
$split_words array_map('strtolower'$split_words);

« Last Edit: December 10, 2010, 01:15:29 AM by V@no »
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
@ Kai ...
... thanks for this fix ...

@ all ...
... only a hint : the file search_utils.php is to find in /includes/ ...

Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline haider512

  • Full Member
  • ***
  • Posts: 153
    • View Profile
Many Thanks...Keep rocking....