1
Vote

function argument initalizers marked as error

description

class MisMabelXmlCache extends MySqlXmlCache
{
    function __construct($table, $key = NULL, $item = 'Item', $collection = NULL)
    {
        parent::__construct(CACHE_PATH, $GLOBALS['MySql'], $table, $item, $collection);
        $this->KeyField = $key;
        $this->FilenamePrefix = "{$table}_";
    }
}
 
 
$key = NULL causes "Syntax error, unexpected '=' expected ',' or ')'

comments

neonp wrote Dec 7, 2008 at 7:32 AM

I've not dealed yet with initialization on function parameters

wrote Feb 14, 2013 at 6:14 PM