Menu

#57 More object to string converting errors

open
nobody
None
5
2008-04-16
2008-04-16
Anonymous
No

(For some reason sourceforge login does not work either... - oh6iz)

Maybe someone changed code to use objects but not quite everywhere. And the result is that in many places object is converted to string and then tried to be manipulated. And amazingly it works when error settings are not very strict. But I'm not sure if any of the code has been doing much of anything.

And probably there has been some problems as there are comments for FIXME's.

Here are couple of more examples in ResultRenderer/Default.php:

protected function getVariableArrayFromRecordSet(ADORecordSet $dbRecordSet, $strResultForm)

{
...
foreach ($dbRecordSet as $row) {

$arResultRow = array();

foreach ($arResultVars as $strVar) {

/*Marja: $strVar is an object - maybe needs to use
$strVar->variable? */
$strVarName = (string)$strVar;

if (!isset($this->sg->arVarAssignments[$strVarName])) {

//variable is in select, but not in result (test: q-select-2)

$arResultRow[$strVarName] = '';

} else {

$arVarSettings = $this->sg->arVarAssignments[$strVarName];

$strMethod = $this->arCreationMethods[$arVarSettings[1]];

$arResultRow[$strVarName] = $this->$strMethod($dbRecordSet, $arVarSettings[0], $strVar);

}

}

protected function createSubjectFromDbRecordSetPart(ADORecordSet $dbRecordSet, $strVarBase, $strVar)

{
/*Marja: $strVar is an object - maybe needs to use
$strVar->variable? */

$strVarName = $strVar;

if ($dbRecordSet->fields[$strVarBase . '.' . $this->sg->arVarAssignments[$strVarName]['sql_value']] === null) {

//FIXME: should be NULL, but doesn't pass test

return '';

}

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.