Closed tablecell closed 6 years ago
if querystring has a key ,but no value given just like /testGetParam? aa=&bb=11000 vendor\vlucas\bulletphp\src\Bullet\Request.php Line 416
return (isset($this->_params[$key])) ? $this->_params[$key] : $default;
$request->param('aa','defautValue') return NULL
i change to
if( isset($this->_params[$key] )){
if (NULL != $this->_params[$key]){
return $this->_params[$key];
}
}
return $default;
it works ok for $_GET but do nothing with $_POST
$request->param(s)() doesn't store query or post params, as stated in the documentation: http://bulletphp.com/docs/request/. Using the proper query() and post() methods will give the proper result.
test.php
neither input AA field or not, $aa is always got default value i assume the correct logic of $request->param('inputfield','default_value') is that if input field AA has value ,then get the input value ,if value of field AA omit ,then set default value but the result is $aa always return default value just like statement $aa ='default value';