Hi Jim,
I'm using the latest download from http://www.indicia.org.uk/downloads (0.9.0) which I downloaded in mid-March(ish).
The code around the first error on data-entry-helper.php line 3312 (annotated in code) is:
/**
* Implode the rows we are putting into the species checklist, with application of classes to image rows.
*/
private static function species_checklist_implode_rows($rows, $imageRowIdxs) {
$r = '';
foreach ($rows as $idx => $row) {
$class = in_array($idx, $imageRowIdxs) ? ' class="supplementary-row"' : '';
LINE 3312 $r .= "<tr$class>$row</tr>\n";
}
return $r;
}
The second error I referred to was line 2242 (annotated in code) on report_helper.php along with a third error (
Invalid argument supplied for foreach() in .../records/sites/all/modules/iform/client_helpers/report_helper.php on line 2255.) and the code around these errors is:
// Are there any parameters embedded in the request data, e.g. after submitting the params form?
$providedParams = $_REQUEST;
// Is there a saved cookie containing previously used report parameters?
if (isset($_COOKIE['providedParams']) && !empty($options['rememberParamsReportGroup'])) {
$cookieData = json_decode($_COOKIE['providedParams'], true);
// guard against a corrupt cookie
if (!is_array($cookieData))
$cookieData=array();
if (!empty($cookieData[$options['rememberParamsReportGroup']]))
$cookieParams = $cookieData[$options['rememberParamsReportGroup']];
// We shouldn't use the cookie values to overwrite any parameters that are hidden in the form as this is confusing.
$ignoreParamNames = array();
foreach($options['paramsToExclude'] as $param)
$ignoreParamNames[$options['reportGroup']."-$param"] = '';
$cookieParams = array_diff_key($cookieParams, $ignoreParamNames);
$providedParams = array_merge(
$cookieParams,
$providedParams
LINE 2242 );
}
if (!empty($options['rememberParamsReportGroup'])) {
// need to store the current set of saved params. These need to be merged into an array to go in
// the single stored cookie with the array key being the rememberParamsReportGroup and the value being
// an associative array of params.
if (!isset($cookieData))
$cookieData = array();
$cookieData[$options['rememberParamsReportGroup']]=$providedParams;
setcookie('providedParams', json_encode($cookieData));
}
// Get the report group prefix required for each relevant parameter
$paramKey = (isset($options['reportGroup']) ? $options['reportGroup'] : '').'-';
LINE 2255 foreach ($providedParams as $key=>$value) {
if (substr($key, 0, strlen($paramKey))==$paramKey) {
// We have found a parameter, so put it in the request to the report service
$param = substr($key, strlen($paramKey));
$params[$param]=$value;
}
}
return $params;
}
Many thanks,
Fiona
Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar