summaryrefslogtreecommitdiff
path: root/ext/date/php_date.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r--ext/date/php_date.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index a0a189bbe4..439621f5e5 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -4888,8 +4888,8 @@ static int php_date_period_initialize_from_hash(php_period_obj *period_obj, Hash
ht_entry = zend_hash_str_find(myht, "include_start_date", sizeof("include_start_date")-1);
if (ht_entry &&
- Z_TYPE_P(ht_entry) == IS_BOOL) {
- period_obj->include_start_date = Z_BVAL_P(ht_entry);
+ (Z_TYPE_P(ht_entry) == IS_FALSE || Z_TYPE_P(ht_entry) == IS_TRUE)) {
+ period_obj->include_start_date = (Z_TYPE_P(ht_entry) == IS_TRUE);
} else {
return 0;
}