From 8e3653eef9b7f31bf4eaa78c95453f6e6cbfd657 Mon Sep 17 00:00:00 2001 From: Emiel Bruijntjes Date: Sun, 16 Mar 2014 15:43:35 +0100 Subject: [PATCH] fixed empty() call --- include/call.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/call.h b/include/call.h index 7cf68bb0..d71c0778 100644 --- a/include/call.h +++ b/include/call.h @@ -46,7 +46,7 @@ Value call(const char *name, Params&&... params) */ inline Value array_keys(const Value &value) { return call("array_keys", value); } inline Value array_values(const Value &value) { return call("array_values", value); } -inline Value empty(const Value &value) { return call("empty", value); } +inline Value empty(const Value &value) { return value.isNull() || !value.boolValue(); } inline Value empty(const HashMember &member) { return !member.exists() || empty(member.value()); } inline Value empty(const HashMember &member) { return !member.exists() || empty(member.value()); } //inline Value isset(const Value &value) { return call("isset", value); }