Bug #10032
PHP binding generates incorrect get/set methods for signatureMethod
100%
Description
There appears to be a bug in the bindings/php5/php_code.py whereby it
generates the following functions
protected function get_signatureMethod() {
$t = LassoServer_signatureMethod_get($this->_cptr);
$t = cptrToPhp($t);
return $t;
}
protected function set_signatureMethod($value) {
$value = $value->_cptr;
LassoServer_signatureMethod_set($this->_cptr, $value);
}
but it should be
protected function get_signatureMethod() {
$t = LassoServer_signatureMethod_get($this->_cptr);
return $t;
}
protected function set_signatureMethod($value) {
LassoServer_signatureMethod_set($this->_cptr, $value);
}
Currently calling
$server->signatureMethod = LASSO_SIGNATURE_METHOD_RSA_SHA256;
or
print $server->signatureMethod
both cause errors.
This can be worked around with the following
LassoServer_signatureMethod_set($server->_cptr,LASSO_SIGNATURE_METHOD_RSA_SHA256);
print LassoServer_signatureMethod_get($server->_cptr);
However, this relies upon $server->_cptr being public
Associated revisions
History
Updated by Benjamin Dauvergne about 7 years ago
- Status changed from Nouveau to Résolu (à déployer)
- % Done changed from 0 to 100
Appliqué par commit 022375809ae8e69ab9f1c8d3048c54a271b7e066.
bindings/php5: fix enum getters and setters (fixes #10032)
enumeration type were being wrongly interpreted as objects types because
is_object() was used instead of the local specialisation done in
PhpCode.is_object().
Also fix docstring of getters/setters.