diff options
Diffstat (limited to 'zend')
-rw-r--r-- | zend/value.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/zend/value.cpp b/zend/value.cpp index f98ac10..f596669 100644 --- a/zend/value.cpp +++ b/zend/value.cpp @@ -1486,8 +1486,9 @@ bool Value::contains(const char *key, int size) const // we need the tsrmls_cc variable TSRMLS_FETCH(); - // retrieve the object pointer and check whether the property we are trying to retrieve is marked as private/protected - if (zend_check_property_access(zend_objects_get_address(_val TSRMLS_CC), key, size TSRMLS_CC) == FAILURE) return false; + // retrieve the object pointer and check whether the property we are trying to retrieve + // is marked as private/protected (cast necessary for php 5.3) + if (zend_check_property_access(zend_objects_get_address(_val TSRMLS_CC), const_cast<char *>(key), size TSRMLS_CC) == FAILURE) return false; // check if the 'has_property' method is available for this object auto *has_property = Z_OBJ_HT_P(_val)->has_property; @@ -1563,8 +1564,8 @@ Value Value::get(const char *key, int size) const // we need the tsrm_ls variable TSRMLS_FETCH(); - // read the property (case necessary for php 5.3) - zval *property = zend_read_property(nullptr, _val, (char *)key, size, 0 TSRMLS_CC); + // read the property (cast necessary for php 5.3) + zval *property = zend_read_property(nullptr, _val, const_cast<char *>(key), size, 0 TSRMLS_CC); // wrap in value return Value(property); @@ -1636,7 +1637,7 @@ void Value::setRaw(const char *key, int size, const Value &value) TSRMLS_FETCH(); // update the property (cast necessary for php 5.3) - zend_update_property(nullptr, _val, (char *)key, size, value._val TSRMLS_CC); + zend_update_property(nullptr, _val, const_cast<char *>(key), size, value._val TSRMLS_CC); } else { |