Fix: avoid Warning: A non-numeric value encountered + wrong var name

This commit is contained in:
Regis Houssin 2018-04-18 08:34:48 +02:00
parent 7256edc831
commit eaecf7190a
2 changed files with 8 additions and 8 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2017 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2017-2018 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -212,9 +212,9 @@ print "<br>\n";
if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
if (defaulturl) $param.='&defaulturl='.urlencode(defaulturl);
if (defaultkey) $param.='&defaultkey='.urlencode(defaultkey);
if (defaultvalue) $param.='&defaultvalue='.urlencode(defaultvalue);
if ($defaulturl) $param.='&defaulturl='.urlencode($defaulturl);
if ($defaultkey) $param.='&defaultkey='.urlencode($defaultkey);
if ($defaultvalue) $param.='&defaultvalue='.urlencode($defaultvalue);
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2012 Regis Houssin <regis.houssin@capnetworks.com>
/* Copyright (C) 2006-2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006-2018 Regis Houssin <regis.houssin@capnetworks.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -36,7 +36,7 @@ $sortorder = GETPOST('sortorder','alpha');
$page = GETPOST('page','int');
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="date";
if ($page < 0) { $page = 0; }
if (empty($page) || $page == -1) { $page = 0; }
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
$offset = $limit * $page;