NSA
sudo apt-get thefuckout.tar.gz
- Dec 9, 2011
- 715
- 86
Hello, Devbest.
I'm working on a little script, but I seem to have ran into a little problem.
First, let me paste my code.
On line 28 & 22 I echo "No get found" if a) [line 28] $_GET is not set or b) [line 22] the key wasn't found in the array.
Now, both of these errors are shown if I set $i (set on line 5) to 1, however this causes problems when $num (set on line 4) is set to 0.
When I echo $num & $i I get "11", which means $i is equal to $num, however, line 22 should be called when $i == $num.
So why isn't it echoing?
I'm working on a little script, but I seem to have ran into a little problem.
First, let me paste my code.
PHP:
$reqs = $this->get_reqs;
if(isset($_GET))
{
$get = $_GET;
$num = count($reqs);
$i = 0;
foreach($reqs as $k => $v)
{
if($i != $num)
{
if(array_key_exists($k, $get))
{
$func = "\$this->" . $reqs[$k] . "();";
eval($func);
}
else
{
$i++;
}
}
else
{
echo "no get found.";
}
}
}
else
{
echo "No get found.";
}
On line 28 & 22 I echo "No get found" if a) [line 28] $_GET is not set or b) [line 22] the key wasn't found in the array.
Now, both of these errors are shown if I set $i (set on line 5) to 1, however this causes problems when $num (set on line 4) is set to 0.
When I echo $num & $i I get "11", which means $i is equal to $num, however, line 22 should be called when $i == $num.
So why isn't it echoing?
Last edited: