by shannah » Thu Jun 24, 2010 8:47 am
This error isn't all that helpful. I've made a small change to Table.php that should propagate the error up another level to make some more sense:
- Code: Select all
Index: Dataface/Table.php
===================================================================
--- Dataface/Table.php (revision 1877)
+++ Dataface/Table.php (revision 1878)
@@ -2627,7 +2627,10 @@
//$absolute_name = Dataface_Table::absoluteFieldName($path[1], $relationship->_schema['selected_tables'], null, $relationship->_schema['columns']);
//echo "Absolute_name = $absolute_name\n<br>"; print_r($relationship->_schema['selected_tables']);
//echo Dataface_Error::printStackTrace();
-
+ if ( PEAR::isError($relationship) ){
+ $err = PEAR::raiseError(SCHEMA_NO_SUCH_FIELD_ERROR,null,null,null, "Field $fieldname does not exist in table ".$this->tablename);
+ return $err;
+ }
$this->_relatedFields[$path[0]][$path[1]] =& $relationship->getField($path[1]); //Dataface_Table::getTableField($absolute_name);
}