Revision: 862
http://cs-project.svn.sourceforge.net/cs-project/?rev=862&view=rev
Author: crazedsanity
Date: 2008-03-30 15:03:03 -0700 (Sun, 30 Mar 2008)
Log Message:
-----------
Backport for issue #165 (no exception if retval is non-numeric).
FIXES ISSUE:::
#165: Fatal error retrieving tod records on issue with root-level ancestry
/lib/mainRecordClass.php:
* get_parent_from_ancestry():
-- extra check check so if there are no ":" characters in the ancestry
string, but $goBackLevels is 0 (given the ancestry string is numeric),
it will simply return the value of the given string.
Modified Paths:
--------------
trunk/1.1/lib/mainRecordClass.php
Modified: trunk/1.1/lib/mainRecordClass.php
===================================================================
--- trunk/1.1/lib/mainRecordClass.php 2008-03-30 21:52:11 UTC (rev 861)
+++ trunk/1.1/lib/mainRecordClass.php 2008-03-30 22:03:03 UTC (rev 862)
@@ -597,6 +597,9 @@
}
}
}
+ elseif(!preg_match('/:/', $ancestryString) && is_numeric($ancestryString)) {
+ $retval = $ancestryString;
+ }
return($retval);
}//end get_parent_from_ancestry()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|