note 105451 deleted from function.create-function by danbrown
| From: | danbrown@php.net | Date: | Sat, 20 Aug 2011 16:00:53 +0000 |
| Subject: | note 105451 deleted from function.create-function by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182608@lists.php.net to get a copy of this message | ||
Note Submitter: web dot developer85 at gmail dot com
----
TO: Dave H 24-Mar-2011 02:47
Thanks for your great function.
I made a little patch for it. Because if default parameter is array it makes error.
$val = $param->getDefaultValue();
if(is_string($val))
{
$val = "'$val'";
}
/* this is the patch */
elseif( is_array($val) )
{
$val = "array()";
}
/* _this is the patch */
$fproto .= ' = '.$val;