From c2f054ed386c352806a5a815f4d8982b486a3153 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Wed, 17 Aug 2016 18:58:12 +0200 Subject: 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 --- adodb-exceptions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'adodb-exceptions.inc.php') 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; } -- cgit v1.3