aboutsummaryrefslogtreecommitdiff
path: root/php/types.php
diff options
context:
space:
mode:
Diffstat (limited to 'php/types.php')
-rw-r--r--php/types.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/php/types.php b/php/types.php
index 6094558..fa57266 100644
--- a/php/types.php
+++ b/php/types.php
@@ -167,7 +167,9 @@ function _dissoc_BANG($hm) {
$args = func_get_args();
for ($i=1; $i<count($args); $i++) {
$ktoken = $args[$i];
- unset($hm[$ktoken]);
+ if ($hm && $hm->offsetExists($ktoken)) {
+ unset($hm[$ktoken]);
+ }
}
return $hm;
}