cvs: pear /CodeGen_PECL/PECL/Element Function.php

From: Date: Tue, 07 Mar 2006 00:55:10 +0000
Subject: cvs: pear /CodeGen_PECL/PECL/Element Function.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38958@lists.php.net to get a copy of this message
hholzgra Tue Mar 7 00:55:10 2006 UTC Modified files: /pear/CodeGen_PECL/PECL/Element Function.php Log: only arrays and mixed values can be passed by reference http://cvs.php.net/viewcvs.cgi/pear/CodeGen_PECL/PECL/Element/Function.php?r1=1.26&r2=1.27&diff_format=u Index: pear/CodeGen_PECL/PECL/Element/Function.php diff -u pear/CodeGen_PECL/PECL/Element/Function.php:1.26 pear/CodeGen_PECL/PECL/Element/Function.php:1.27 --- pear/CodeGen_PECL/PECL/Element/Function.php:1.26 Mon Mar 6 20:38:40 2006 +++ pear/CodeGen_PECL/PECL/Element/Function.php Tue Mar 7 00:55:09 2006 @@ -15,7 +15,7 @@ * @author Hartmut Holzgraefe <hartmut@php.net> * @copyright 2005 Hartmut Holzgraefe * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Function.php,v 1.26 2006/03/06 20:38:40 hholzgra Exp $ + * @version CVS: $Id: Function.php,v 1.27 2006/03/07 00:55:09 hholzgra Exp $ * @link http://pear.php.net/package/CodeGen */ @@ -464,6 +464,9 @@ // pass by reference? if (count($tokens) && $tokens[0][0] === 'char' && $tokens[0][1] === '&') { list($type, $token) = array_shift($tokens); + if ($type != "array" && $type != "mixed") { + return PEAR::raiseError("only 'array' and 'mixed' arguments may be passed by reference, '{$param[name]}' is of type '$type'"); + } $param['byRef'] = true; $this->hasRefArgs = true; }

« previous php.pear.cvs (#38958) next »