• Page:
  • 1

Error page on wrong SQL query in Joomla


Error page on wrong SQL query in Joomla

1 week, 6 days ago
In Joomla 3.x and abov,e if any of your page has an SQL query which has a wrong syntax, then it will take you to an error page. In earlier versions it used to discard it and execute the next lines of code, but in the newer versions it just stops and throws the user to the error page.

This happens because of the following line written in the execute function of your database driver:

catch (RuntimeException $e)
					// Get the error number and message.
					$this->errorNum = $this->getErrorNumber();
					$this->errorMsg = $this->getErrorMessage($query);

					JLog::add(JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg), JLog::ERROR, 'database-error');

					throw new RuntimeException($this->errorMsg, $this->errorNum, $e); //just comment out this line
The following user(s) said Thank You: Rajat Pal
  • Page:
  • 1

Upcoming Events

No events found.

Who's Online

7 users online