[drupal-devel] [bug] Re: Notifications does not disappear with PHP 5

Robin Monks drupal-devel at drupal.org
Thu May 5 14:03:09 UTC 2005


Issue status update for http://drupal.org/node/21364

 Project:      Drupal
 Version:      4.6.0
 Component:    base system
 Category:     bug reports
 Priority:     normal
-Assigned to:  Anonymous
+Assigned to:  Robin Monks
 Reported by:  pm
 Updated by:   Robin Monks
-Status:       active
+Status:       patch

This patch should clear the header after each print-out without using a
blank array(), which I believe could cause this:


Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.46
diff -u -r1.46 bootstrap.inc
--- includes/bootstrap.inc   12 Apr 2005 16:55:11 -0000   1.46
+++ includes/bootstrap.inc   5 May 2005 13:57:54 -0000
 -685,8 +685,8 @@
  */
 function drupal_get_messages() {
   $messages = drupal_set_message();
-  $_SESSION['messages'] = array();
-
+  session_unregister('messages');
+  unset($_SESSION['messages']);
   return $messages;
 }


It might be good for someone who was having this problem to try this
patch and see if it does fix the problem.


Robin




Robin Monks



Previous comments:
------------------------------------------------------------------------

April 26, 2005 - 15:28 : pm

Attachment: http://drupal.org/files/issues/screenshot_1.jpg (42.17 KB)

This issue happens with PHP 5.0.4, but not with PHP 4.3.11.


Whenever I change a setting from administer > (any module), "changes
have been saved" messages and other notifications do not disappear.
I end up with dozens of notifications while changing settings and
browsing through drupal modules. Other red error messages stack up as
well (even if I fix what they want).


Logging out does not solve the problem.




------------------------------------------------------------------------

April 26, 2005 - 15:32 : pm

I may have been unprecise.
Actually, logging out removes the notifications but the problem is
still there.




------------------------------------------------------------------------

April 29, 2005 - 13:42 : jlangdale

I upgraded from 4.5, PHP4 to 4.6 and PHP6 yesterday.  I am having this
same issue with status messages.  Messages only go away after logging
out.


http://www.langdale.ca:81/drupal [1]
Running:


Darwin 7.9.0 (Mac OS X 10.3.9)
Apache 2.0.54
PHP 5.0.4
Drupal 4.6.0
MySQL 4.0.20 (Standard Darwin 7.3.0 PPC)


[1] http://www.langdale.ca:81/drupal




------------------------------------------------------------------------

May 4, 2005 - 20:29 : techsoldaten

Same problem. Notifications will not go away unless I log out.


Doing a dump of the user variable, I get the following: 


public $session = 'messages|a:1:{s:6:"status";a:3:{i:0;s:28:"The
changes have been saved.";i:1;s:42:"The configuration options have been
saved.";i:2;s:42:"The configuration options have been saved.";}}';


It looks like this never gets set back to an array.


Fedora Core 3
PHP5
Apache2







More information about the drupal-devel mailing list