Notice error in PHP logs

pvasener - May 4, 2007 - 14:40
Project:Logo Tool
Version:5.x-2.3
Component:Code
Category:bug report
Priority:minor
Assigned:Unassigned
Status:needs review
Description

First, thanks for v2.3 which corrected a lot of issues I encountered (cache pb, wildcard not working...). Only one tiny hitch remains which I was able to correct easily. For each page request, I had a Notice report in my PHP log files concerning a missing index in logo.php line 26. This is due to the fact that a test is made on $_GET['logo'] without an index checking. To correct line 26 of logo.php should be changed from:
$logo = $_GET['logo'] ? $_GET['logo'] : variable_get('logotool_logo', '');
to
$logo = isset($_GET['logo']) ? $_GET['logo'] : variable_get('logotool_logo', '');

#1

pobster - May 5, 2007 - 20:04

Hmmm never realized doing it that way would cause any problems!... Mind you it's not like I've ever read a PHP programming book or had any lessons, I've absolutely no idea of what is good programming practise or not!

...Thanks, I'll change that (and look out for that one in future).

Pobster

 
 

Drupal is a registered trademark of Dries Buytaert.