diff options
Diffstat (limited to 'php/src/php7/Properties.cpp')
-rw-r--r-- | php/src/php7/Properties.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/php/src/php7/Properties.cpp b/php/src/php7/Properties.cpp index 16abe91eea7..87d040f7c65 100644 --- a/php/src/php7/Properties.cpp +++ b/php/src/php7/Properties.cpp @@ -162,7 +162,7 @@ ZEND_METHOD(Ice_Properties, getPropertyAsIntWithDefault) { char* name; size_t nameLen; - long def; + zend_long def; if(zend_parse_parameters(ZEND_NUM_ARGS(), const_cast<char*>("sl"), &name, &nameLen, &def) == FAILURE) { @@ -175,8 +175,9 @@ ZEND_METHOD(Ice_Properties, getPropertyAsIntWithDefault) string propName(name, nameLen); try { - Ice::Int val = _this->getPropertyAsIntWithDefault(propName, def); - RETURN_LONG(static_cast<long>(val)); + // TODO: Range check + Ice::Int val = _this->getPropertyAsIntWithDefault(propName, static_cast<Ice::Int>(def)); + RETURN_LONG(val); } catch(const IceUtil::Exception& ex) { |