Hi,
I've found error in modules/googlemap/placecheck.php
. If there are places in gedcom absent in the places db table, errors occur about line 288 and later in the mentioned file. $row
is null but the code is trying to index it. I'm surprised that it ever worked (but worked, I did used it in the past). Indexing null was illegal before php8, maybe from php7? Summing up, I propose to use "safe objedct" pattern adding the following lines (shown with one line context) after 281 line of the placecheck.php
file (with correct indent of course, I can't paste it properly here):
->fetchOneRow(PDO::FETCH_ASSOC);
** if(is_null($row)) {
$row = array('pl_id'=>'', 'pl_place'=>'', 'pl_long'=>0, 'pl_lati'=>'', 'pl_placerequested'=>$levels[$z]);
}
** if (!empty($row['pl_id'])) {
T.B.
Diff:
Thank you.
Very few people (myself included) use the googlemap module, so it's no surprise that there are errors in it.
The attached placecheck.zip is placecheck.php with your correction applied.
It will be in the next SVN update.
Gerry, it is a surprise to me, because I'm sure it worked some time ago. I don't remember which version of php I had back then. It is possible that 6.x or even 5.x.
T.B.