News:

Please note these forums are mostly a testing ground for my SMF work and I don't really use them otherwise.

Main Menu

Paste-1260333784:v:use_geshi-1:v:type-php

Started by Guest, Dec 09, 2009, 04:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Guest

      case 'array_string':
         if (is_array($replacement))
         {
            if (empty($replacement))
               smf_db_error_backtrace('Database error, given array of string values is empty. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);

            foreach ($replacement as $key => $value)
               $replacement[$key] = sprintf('\'%1$s\'', mysql_real_escape_string($value, $connection));

            return implode(', ', $replacement);
         }
         else
            smf_db_error_backtrace('Wrong value type sent to the database. Array of strings expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
      break;