You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
phpStan: Parameter #3 $value of method XoopsObject::initVar() expects null, int given.
/*** initialize variables for the object** YOU SHOULD NOT USE THE $enumeration PARAMETER** @access public** @param string $key* @param int $data_type set to one of XOBJ_DTYPE_XXX constants (set to XOBJ_DTYPE_OTHER if no data type checking nor text sanitizing is required)* @param null $value* @param bool $required require html form input?* @param int $maxlength for XOBJ_DTYPE_TXTBOX type only* @param string $options* @param string $enumerations** @return void*/publicfunctioninitVar($key, $data_type, $value = null, $required = false, $maxlength = null, $options = '', $enumerations = '')
{
$this->vars[$key] = array(
'value' => $value,
'required' => $required,
'data_type' => $data_type,
'maxlength' => $maxlength,
'changed' => false,
'options' => $options,
'enumeration' => $enumerations);
}
Should we change
* @param null $value
to
* @param string|int|null $value
Could we also make similar adjustments for all other cases like this one?
The text was updated successfully, but these errors were encountered:
Whatever works better for you - I'm happy to help, but if you prefer to do it yourself because of potential errors on my part, I perfectly fine with that.
So just let me know...
I want to set the default to 1:
But XOOPS Kernel Object requires null:
Should we change
* @param null $value
to
* @param string|int|null $value
Could we also make similar adjustments for all other cases like this one?
The text was updated successfully, but these errors were encountered: