diff options
| author | Damien Regad <dregad@mantisbt.org> | 2016-08-17 18:58:12 +0200 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2016-08-29 00:14:39 +0200 |
| commit | c2f054ed386c352806a5a815f4d8982b486a3153 (patch) | |
| tree | de09126403f3847061e42f8a0a9754d62d543450 /adodb-exceptions.inc.php | |
| parent | 7ce997d4c5957a1a96e7ab483ad088b15f02b191 (diff) | |
| download | adodb-c2f054ed386c352806a5a815f4d8982b486a3153.tar.gz adodb-c2f054ed386c352806a5a815f4d8982b486a3153.tar.bz2 adodb-c2f054ed386c352806a5a815f4d8982b486a3153.zip | |
Remove '\n' from Exception messages
Messages with newline cause uncaught exceptions to be displayed as
follows (note the single ' where the message is expected):
$ php -r 'throw new exception("blah\n");'
Fatal error: Uncaught exception 'Exception' with message ' in Command line code on line 1
Fixes #273
Diffstat (limited to 'adodb-exceptions.inc.php')
| -rw-r--r-- | adodb-exceptions.inc.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/adodb-exceptions.inc.php b/adodb-exceptions.inc.php index ea045fbb..45e7df54 100644 --- a/adodb-exceptions.inc.php +++ b/adodb-exceptions.inc.php @@ -33,16 +33,16 @@ var $database = ''; case 'EXECUTE': $this->sql = is_array($p1) ? $p1[0] : $p1; $this->params = $p2; - $s = "$dbms error: [$errno: $errmsg] in $fn(\"$this->sql\")\n"; + $s = "$dbms error: [$errno: $errmsg] in $fn(\"$this->sql\")"; break; case 'PCONNECT': case 'CONNECT': $user = $thisConnection->user; - $s = "$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)\n"; + $s = "$dbms error: [$errno: $errmsg] in $fn($p1, '$user', '****', $p2)"; break; default: - $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n"; + $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)"; break; } |
