Bug in /com_fabrik/models/form.php

Hello,

I've got the latest version of Fabrik and installed it.
I had bad problems when trying to insert a new record through a form.
After lot of checks I've found a problem in this:

function getRowId()
...
if ($this->_rowId == ":1") {
$this->_rowId = "-1";
}

I needed rowId to be 0;
When it is int(0), this check is TRUE :)1 casted to 0) and I have wrong results.
I've fixed it as:
if (strval($this->_rowId) == ":1") {

Do you think it is right?
Thanks in advance for any help.

Best regards
Chudomir
 
Are you sure you have the most recent version? 2.0.2? The current code has:

PHP:
		// $$$ hugh - for some screwed up reason, when using SEF, rowid=-1 ends up as :1
		// $$$ rob === compare as otherwise 0 == ":1" which menat that the users record was  loaded
		if ((string)$this->_rowId === ":1") {
			$this->_rowId = "-1";
		}

... and I thought that change had been made before 2.0.2. If not, you'll just need to update to latest SVN and that one is fixed.

Thanks for the report though.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top