Messages missing var patch

apmuthu wrote on Monday, April 08, 2013:

Latest GitHub code

Either $_REQUEST[‘form_active’] or $_REQUEST[‘form_inactive’] are present at any time but not both and certainly none at all as well.

This results in the following in the apache error log listing:

PHP Notice:  Undefined index: form_inactive in /var/www/openemr/interface/main/messages/messages.php on line 65, referer: http://openemr.example.com/interface/main/main_screen.php?auth=login&site=default

The patch to fix this is:

--- old/interface/main/messages/messages.php	Mon Apr 08 10:58:00 2013
+++ new/interface/main/messages/messages.php	Mon Apr 08 14:10:58 2013
@@ -61,8 +61,8 @@
 }
 
 // Collect active variable and applicable html code for links
-$form_active = $_REQUEST['form_active'];
-$form_inactive = $_REQUEST['form_inactive'];
+$form_active   = (isset($_REQUEST['form_active'])   ? $_REQUEST['form_active']   : FALSE);
+$form_inactive = (isset($_REQUEST['form_inactive']) ? $_REQUEST['form_inactive'] : FALSE);
 if ($form_active) {
   $active = '1';
   $activity_string_html = 'form_active=1';

bradymiller wrote on Saturday, April 13, 2013:

Hi,
I pushed this commit to official codebase.
thank you for the contribution,
-brady
OpenEMR