Created
November 11, 2013 14:48
-
-
Save euank/7414238 to your computer and use it in GitHub Desktop.
Code found in the wild (all in the same project)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (stopped) { | |
// don't proceed | |
} else { | |
// proceed | |
/* code */ | |
} | |
/* Note, there are a ton of these. if(CONDITION) { /* don't do anything */ } else { /* code */} ... I suspect the programmer did not know you could do if(!CONDITION) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Letting the user clobber any global variable by setting a query param... Yup, good idea */ | |
if(is_array($_GET)) | |
{ | |
foreach($_GET as $key=>$value) | |
{ | |
$$key = $value; | |
} | |
} | |
if(is_array($_POST)) | |
{ | |
foreach($_POST as $key=>$value) | |
{ | |
$$key = $value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment