-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4888: Undefined Index warnings during IMS CC import #8
base: master
Are you sure you want to change the base?
Conversation
…ameters in startElement()
@@ -26,19 +26,19 @@ if ($_GET['tile']) { | |||
<html lang="<?php echo $myLang->getCode(); ?>"> | |||
<head> | |||
<title><?php echo _AT($lang_variable); ?></title> | |||
<?php if ($_GET['frame']) { ?> | |||
<?php if (array_key_exists('frame', $_GET)) { ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 18 uses "isset($_GET['tile']) && $_GET['tile']" to check the presence of the $_GET value while this line uses another approach. Should we make it consistent by using one way through? The same comment applies to line 36, 41.
BTW, I personally likes the line 18 way better. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference is that isset() will return false for array keys that have their value set to NULL whereas array_key_exists() only checks that the key exists.
That said, I'm struggling to recall the reason I used these styles of code. I think it was because I believed or saw that some of the GET variables may be NULL e.g. "/home/prog.php" rather than "/home/prog.php?done"
see http://atutor.ca/atutor/mantis/view.php?id=4888