Bug fixes

This commit is contained in:
2011-04-22 00:26:07 +01:00
parent 177ed337b0
commit 75c6ff2ad8
4 changed files with 15 additions and 7 deletions

View File

@@ -73,7 +73,7 @@ class SihnonFramework_RequestParser {
}
public function exists($key) {
return isset($this->vars[$key]);
return array_key_exists($key, $this->vars);
}
public function get($key, $default = null) {
@@ -81,7 +81,7 @@ class SihnonFramework_RequestParser {
return $this->vars[$key];
}
if (is_string($default) && preg_match('/^[a-zA-Z_]+_Exception/', $default) && class_exists($default) && is_subclass_of($default, SihnonFramework_Exception)) {
if (is_string($default) && preg_match('/^[a-zA-Z_]+_Exception/', $default) && class_exists($default) && is_subclass_of($default, 'SihnonFramework_Exception')) {
throw new $default();
}