Projet

Général

Profil

Bug #10032

PHP binding generates incorrect get/set methods for signatureMethod

Ajouté par Brett Gardner il y a environ 8 ans. Mis à jour il y a environ 8 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Catégorie:
-
Version cible:
Début:
18 février 2016
Echéance:
% réalisé:

100%

Temps estimé:
Patch proposed:
Non
Planning:

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

Révisions associées

Révision 02237580 (diff)
Ajouté par Benjamin Dauvergne il y a environ 8 ans

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.

Historique

#1

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

  • Statut changé de Nouveau à Résolu (à déployer)
  • % réalisé changé de 0 à 100
#2

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

  • Version cible mis à 2.5.1
#3

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

  • Statut changé de Résolu (à déployer) à Fermé

Formats disponibles : Atom PDF