Possible Duplicate:
PHP: “Notice: Undefined variable” and “Notice: Undefined index”
I got error:
Notice: Undefined variable: null
Line in code is:
$input = new $class($company, null, $sablonas, $null, $value);
Class constructor is:
public function __construct($company, $document, $sablonas, $options, $value = null) {
How I can pass a null value?
It’s talking about
(2), not(1). You have a typo with$null.The notice message “Undefined variable: null” is a little misleading here, but consider the following case:
You can see that the
$isn’t included in the name that the notice message gives you, so if you follow this logic back you arrive at the conclusion I made at the top of this answer.