]> granicus.if.org Git - php/commitdiff
Fixed bug #71070 Custom session handler write method returns false, warning message...
authorYasuo Ohgaki <yohgaki@php.net>
Mon, 18 Jan 2016 03:03:41 +0000 (12:03 +0900)
committerYasuo Ohgaki <yohgaki@php.net>
Mon, 18 Jan 2016 03:03:41 +0000 (12:03 +0900)
This is commited to master only.
If you have better error message suggestion, feel free to improve it.

ext/session/session.c

index 8427f852bcfeedadb7a6670f21249a4b05890228..4385dca81530a2cf8c697d7a6da5c37d2af9aa6a 100644 (file)
@@ -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));
+                               }
                        }
                }
        }