git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b44fb9a
)
Correctly reset php error handler even when user-code raises an exception
author
gggeek
<giunta.gaetano@gmail.com>
Sat, 30 May 2015 11:48:28 +0000
(13:48 +0200)
committer
gggeek
<giunta.gaetano@gmail.com>
Sat, 30 May 2015 11:48:28 +0000
(13:48 +0200)
NEWS
patch
|
blob
|
history
src/Server.php
patch
|
blob
|
history
diff --git
a/NEWS
b/NEWS
index
8d8c130
..
5880306
100644
(file)
--- a/
NEWS
+++ b/
NEWS
@@
-47,6
+47,11
@@
PLEASE READ CAREFULLY THE NOTES BELOW to insure a smooth upgrade.
* improved: more tests in the test suite
* improved: more tests in the test suite
+* fixed: the server would not reset the user-set debug messages between subsequent service() calls
+
+* fixed: the server would not reset previous php error handlers when an exception was thrown by user code and
+ exception_handling set to 2
+
* fixed: the server would fail to decode a request with ISO-8859-1 payload and character set declaration in the xml
prolog only
* fixed: the server would fail to decode a request with ISO-8859-1 payload and character set declaration in the xml
prolog only
diff --git
a/src/Server.php
b/src/Server.php
index
96aac17
..
70b45de
100644
(file)
--- a/
src/Server.php
+++ b/
src/Server.php
@@
-678,6
+678,13
@@
class Server
// in the called function, we wrap it in a proper error-response
switch ($this->exception_handling) {
case 2:
// in the called function, we wrap it in a proper error-response
switch ($this->exception_handling) {
case 2:
+ if ($this->debug > 2) {
+ if (self::$_xmlrpcs_prev_ehandler) {
+ set_error_handler(self::$_xmlrpcs_prev_ehandler);
+ } else {
+ restore_error_handler();
+ }
+ }
throw $e;
break;
case 1:
throw $e;
break;
case 1: