summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-03-30 15:30:41 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-03-30 15:30:41 +0200
commit6a90c9cd9b16a2785b9bc4a56867a1778b772f27 (patch)
tree53ddc7b67fea4c4d491e90551bdebf8772fd25f2
parent41cc89280ec8c21638fe6d4931ef145b103b5caa (diff)
parent6f1e21d151f6d090e4affe623db65a5a0879e4ec (diff)
Merge branch 'master' of https://github.com/CopernicaMarketingSoftware/PHP-CPP
-rw-r--r--zend/value.cpp11
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
{