Changeset 336 for trunk/admin/admin.php


Ignore:
Timestamp:
Sep 23, 2020, 11:32:27 AM (4 years ago)
Author:
roby
Message:

Admin: prime modifiche per compatibilità con php 7.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/admin.php

    r333 r336  
    252252                        $sth = $dbi->prepare("select id_cons_gen  from ".$prefix."_ele_cons_comune where preferita='1' and (id_comune='$id_comune' or id_comune=0)");
    253253                        $sth->execute();       
    254                         $row = $sth->fetch(PDO::FETCH_BOTH);   
    255 $id_cons_gen=$row[0];
     254                        $row = $sth->fetch(PDO::FETCH_BOTH);
     255                        if($sth->rowCount())
     256                                $id_cons_gen=$row[0];
     257                        else
     258                        $id_cons_gen=0;
    256259}
    257260$currentlang=$_SESSION['lang'];
Note: See TracChangeset for help on using the changeset viewer.