Changeset 95 for trunk/add.php


Ignore:
Timestamp:
Dec 6, 2021, 11:33:48 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Added: Explicit types for better type checking.
  • Fixed: Support for php 8.0.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/add.php

    r92 r95  
    1616  if (array_key_exists('Time', $_GET)) $Time = $_GET['Time'] * 1;
    1717  AddValue(addslashes($_GET['MeasureId']), addslashes($_GET['Value']), $Time);
    18   $AddedValues = $AddedValues + 1; 
     18  $AddedValues = $AddedValues + 1;
    1919}
    2020
     
    2626  if (array_key_exists('Time'.$I, $_GET)) $Time = $_GET['Time'.$I] * 1;
    2727  AddValue(addslashes($_GET['MeasureId'.$I]), addslashes($_GET['Value'.$I]), $Time);
    28   $AddedValues = $AddedValues + 1; 
     28  $AddedValues = $AddedValues + 1;
    2929  $I++;
    3030}
     
    3232if ($AddedValues == 0) echo('Nebyly zadány potřebné parametry MeasureId a Value.'."\n");
    3333
    34 function AddValue($MeasureId, $Value, $Time)
     34function AddValue(int $MeasureId, float $Value, int $Time): void
    3535{
    3636  global $Core;
Note: See TracChangeset for help on using the changeset viewer.