From 0ee42396139740a163acb2b2cb549fbe38e962e2 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 17 Jun 2011 11:16:45 -0700 Subject: [PATCH] Tweaked Input::has to check for empty strings. Deprecated Input::filled. --- system/input.php | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/system/input.php b/system/input.php index 7e682c6b..1e9fd973 100644 --- a/system/input.php +++ b/system/input.php @@ -17,18 +17,7 @@ class Input { */ public static function has($key) { - return ( ! is_null(static::get($key))); - } - - /** - * Determine if the input data contains an item that is not empty. - * - * @param string $key - * @return bool - */ - public static function filled($key) - { - return (static::has($key) and trim((string) static::get($key)) !== ''); + return ( ! is_null(static::get($key)) and trim((string) static::get($key)) !== ''); } /** @@ -56,18 +45,7 @@ class Input { */ public static function had($key) { - return ( ! is_null(static::old($key))); - } - - /** - * Determine if the old input data contains an item that is not empty. - * - * @param string $key - * @return bool - */ - public static function was_filled($key) - { - return (static::had($key) and trim((string) static::old($key)) !== ''); + return ( ! is_null(static::old($key)) and trim((string) static::old($key)) !== ''); } /**