com web/master: More PHP 8/Phan fixes: include/login.inc manage/event.php

From: Date: Sat, 30 Jan 2021 21:24:58 +0000
Subject: com web/master: More PHP 8/Phan fixes: include/login.inc manage/event.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-29081@lists.php.net to get a copy of this message
Commit: 600780d70030986a5750f917fbc263e830587c04 Author: Rasmus Lerdorf <rasmus@lerdorf.com> Sat, 30 Jan 2021 13:24:58 -0800 Parents: 48cb59d3268189d10951d0e69465dfbb7a4cf852 Branches: master Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=600780d70030986a5750f917fbc263e830587c04 Log: More PHP 8/Phan fixes Changed paths: M include/login.inc M manage/event.php Diff: diff --git a/include/login.inc b/include/login.inc index 3d536be..efe54c3 100644 --- a/include/login.inc +++ b/include/login.inc @@ -49,7 +49,7 @@ if (!$cuser || !$cpw || !verify_password($cuser,$cpw)) { </head> <body> <form method="post" action="<?php echo $_SERVER['SCRIPT_NAME'], query_string();?>"> -<?php echo preserve_form_fields();?> +<?php preserve_form_fields();?> <input type="hidden" name="save" value="1" /> <table> <tr> diff --git a/manage/event.php b/manage/event.php index 1e4694d..a26c20e 100644 --- a/manage/event.php +++ b/manage/event.php @@ -81,12 +81,12 @@ if ($id && $in) { . ($sdato ? "sdato='".real_clean($sdato)."'," : "") . ($edato ? "edato='".real_clean($edato)."'," : "") . ($recur ? "recur='".real_clean($recur)."'," : "") - . "ldesc='".real_clean($in[ldesc])."'," - . "sdesc='".real_clean($in[sdesc])."'," - . "email='".real_clean($in[email])."'," - . "url='".real_clean($in[url])."'," - . "country='".real_clean($in[country])."'," - . "category='".real_clean($in[category])."'" + . "ldesc='".real_clean($in['ldesc'])."'," + . "sdesc='".real_clean($in['sdesc'])."'," + . "email='".real_clean($in['email'])."'," + . "url='".real_clean($in['url'])."'," + . "country='".real_clean($in['country'])."'," + . "category='".real_clean($in['category'])."'" . " WHERE id=".real_clean($id); db_query($query); @@ -256,7 +256,7 @@ $query = "SELECT COUNT(id) FROM phpcal"; if ($searchby) $query .= " $searchby"; $res = db_query($query); -$total = mysql_result($res,0); +$total = (int)mysql_result($res,0); $query = "SELECT phpcal.*,country.name AS cname FROM phpcal LEFT JOIN country ON phpcal.country = country.id $searchby $orderby $limit";

« previous php.webmaster (#29081) next »