X-Git-Url: http://git.cyclocoop.org/?p=ptitvelo%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Fpublic%2Fsandbox.php;fp=www%2Fecrire%2Fpublic%2Fsandbox.php;h=3f615b068eeed8cb7171cf4486e3aca3417496ae;hp=a742c234ac622e9783c8f06cac7e0c88f21c9326;hb=d18fcb8f27a4016e3fa7b50a9b2255d529dca543;hpb=e847eea4a82a7396dd0abf860f9b30d654f38629 diff --git a/www/ecrire/public/sandbox.php b/www/ecrire/public/sandbox.php index a742c23..3f615b0 100644 --- a/www/ecrire/public/sandbox.php +++ b/www/ecrire/public/sandbox.php @@ -50,7 +50,11 @@ function sandbox_composer_filtre($fonc, $code, $arglist, &$p){ elseif ($f = chercher_filtre($fonc)) { // cas particulier : le filtre |set doit acceder a la $Pile // proto: filtre_set(&$Pile, $val, $args...) - $refl = new ReflectionFunction($f); + if (strpbrk($f, ':')) { // Class::method + $refl = new ReflectionMethod($f); + } else { + $refl = new ReflectionFunction($f); + } $refs = $refl->getParameters(); if (isset($refs[0]) AND $refs[0]->name == 'Pile') { $code = "$f(\$Pile,$code$arglist)";