Skip to content

Commit 8eb4a30

Browse files
committed
Remove usage of ZEND_STRL within zend_hash_str_add
This causes compile failures on PHP < 7.3 that I have yet to understand.
1 parent 349e8c6 commit 8eb4a30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/MongoDB/ServerApi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ static HashTable* php_phongo_serverapi_get_properties_hash(phongo_compat_object_
155155
PHONGO_GET_PROPERTY_HASH_INIT_PROPS(is_debug, intern, props, 1);
156156

157157
ZVAL_STRING(&version, mongoc_server_api_version_to_string(mongoc_server_api_get_version(intern->server_api)));
158-
zend_hash_str_add(props, ZEND_STRL("version"), &version);
158+
zend_hash_str_add(props, "version", sizeof("version") - 1, &version);
159159

160160
is_set = mongoc_optional_is_set(mongoc_server_api_get_strict(intern->server_api));
161161
if (is_set) {
@@ -165,7 +165,7 @@ static HashTable* php_phongo_serverapi_get_properties_hash(phongo_compat_object_
165165
}
166166

167167
if (include_null || is_set) {
168-
zend_hash_str_add(props, ZEND_STRL("strict"), &strict);
168+
zend_hash_str_add(props, "strict", sizeof("strict") - 1, &strict);
169169
}
170170

171171
is_set = mongoc_optional_is_set(mongoc_server_api_get_deprecation_errors(intern->server_api));
@@ -176,7 +176,7 @@ static HashTable* php_phongo_serverapi_get_properties_hash(phongo_compat_object_
176176
}
177177

178178
if (include_null || is_set) {
179-
zend_hash_str_add(props, ZEND_STRL("deprecationErrors"), &deprecation_errors);
179+
zend_hash_str_add(props, "deprecationErrors", sizeof("deprecationErrors") - 1, &deprecation_errors);
180180
}
181181

182182
return props;

0 commit comments

Comments
 (0)