From: Yasuo Ohgaki Date: Mon, 18 Jan 2016 03:03:41 +0000 (+0900) Subject: Fixed bug #71070 Custom session handler write method returns false, warning message... X-Git-Tag: php-7.2.0alpha1~620^2~119 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05e87fa41855c58de6435eb1c80a1bc6454362f7;p=php Fixed bug #71070 Custom session handler write method returns false, warning message misleading This is commited to master only. If you have better error message suggestion, feel free to improve it. --- diff --git a/ext/session/session.c b/ext/session/session.c index 8427f852bc..4385dca815 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -611,11 +611,16 @@ static void php_session_save_current_state(int write) /* {{{ */ } if ((ret == FAILURE) && !EG(exception)) { - php_error_docref(NULL, E_WARNING, "Failed to write session data (%s). Please " - "verify that the current setting of session.save_path " - "is correct (%s)", - PS(mod)->s_name, - PS(save_path)); + if (!PS(mod_user_implemented)) { + php_error_docref(NULL, E_WARNING, "Failed to write session data (%s). Please " + "verify that the current setting of session.save_path " + "is correct (%s)", + PS(mod)->s_name, + PS(save_path)); + } else { + php_error_docref(NULL, E_WARNING, "Failed to write session data using user " + "defined save handler. (session.save_path: %s)", PS(save_path)); + } } } }