Guest User

Untitled

a guest
Jun 18th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. Source
  2.  
  3. 391 }
  4. 392
  5. 393 function databaseError($msg, $errorLevel = E_USER_ERROR) {
  6. 394 // try to extract and format query
  7. 395 if(preg_match('/Couldn\'t run query: ([^\|]*)\|\s*(.*)/', $msg, $matches)) {
  8. 396 $formatter = new SQLFormatter();
  9. 397 $msg = "Couldn't run query: \n" . $formatter->formatPlain($matches[1]) . "\n\n" . $matches[2];
  10. 398 }
  11. 399
  12. 400 user_error($msg, $errorLevel);
  13. 401 }
  14. 402 }
  15. 403
  16. 404 /**
  17. 405 * A result-set from a MySQL database.
  18. 406 * @package sapphire
Add Comment
Please, Sign In to add comment