Commit:    600780d70030986a5750f917fbc263e830587c04
Author:    Rasmus Lerdorf <[email protected]>         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";


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to