Following this guide to misinform my inputs, I wonder if the empty string is covered by this?
$jinput = JFactory::getApplication()->input; $this->name = $jinput->get('name', '', 'STRING');
As a rule, without Joomla, I would also check for an empty string. Sort of:
if (!empty($_POST['name']))
Looking at the JInput get method, I see that it checks if it is isset :
public function get($name, $default = null, $filter = 'cmd') { if (isset($this->data[$name])) { return $this->filter->clean($this->data[$name], $filter); } return $default; }
Not the same as isset will only check for null. However, this is the default value for using the get method. So, if I specify an empty string for the second parameter, which I examined here?
$this->name = $jinput->get('name', '', 'STRING');
source share