Voting

: nine minus one?
(Example: nine)

The Note You're Voting On

mandos78 AT mail from google
16 years ago
Careful with this function "ifsetfor" by soapergem, passing by reference means that if, like the example $_GET['id'], the argument is an array index, it will be created in the original array (with a null value), thus causing posible trouble with the following code. At least in PHP 5.

For example:

<?php
$a
= array();
print_r($a);
ifsetor($a["unsetindex"], 'default');
print_r($a);
?>

will print

Array
(
)
Array
(
[unsetindex] =>
)

Any foreach or similar will be different before and after the call.

<< Back to user notes page

To Top