1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 04:38:27 +01:00

Issue #656 - should remove PHP notice in PHP 5.5

This commit is contained in:
Cameron 2014-06-27 20:58:39 -07:00
parent facbd4f236
commit 5d89f1fc08

View File

@ -40,9 +40,14 @@ require_once(realpath(e_BASE.$HANDLERS_DIRECTORY.DIRECTORY_SEPARATOR."secure_img
$sim = new secure_image();
if(!isset($_GET['id']))
{
exit;
}
$code = $_GET['id'];
if(preg_match('/^[a-f0-9]{6}$/i', $_GET['clr'])) //hex color is valid
if(!empty($_GET['clr']) && preg_match('/^[a-f0-9]{6}$/i', $_GET['clr'])) //hex color is valid
{
$color = $_GET['clr'];
}