Viewing Paste 410

Formated Paste

  1. case 'array_string':
  2. if (is_array($replacement))
  3. {
  4. if (empty($replacement))
  5. smf_db_error_backtrace('Database error, given array of string values is empty. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
  6.  
  7. foreach ($replacement as $key => $value)
  8. $replacement[$key] = sprintf('\'%1$s\'', mysql_real_escape_string($value, $connection));
  9.  
  10. return implode(', ', $replacement);
  11. }
  12. else
  13. smf_db_error_backtrace('Wrong value type sent to the database. Array of strings expected. (' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__);
  14. break;
Name:
Email:
Code/text to paste:
  • Enable code highlighting
  • Code Language:
  • A duck, cat and a goose walk into a bar. How many animals walked into a bar?:
Highslide for Wordpress Plugin