On Wed, 12 Feb 2020 at 21:16:36, Eli Schwartz wrote:
> I had this sitting around since December and forgot to send it in,
> offered FWIW. It's slightly different in implementation and has more
> wordy commit messages.
Thanks. I will discard the other patch I submitted earlier (Verify that
If a db query returned NULL instead of an array, then accessing $row[0]
now throws a warning. The undocumented behavior of evaluating to NULL
is maintained, and we want to return NULL anyway, so add a check for the
value and fall back on the default function return type.
Signed-off-by: Eli
The try_login() function documents it returns an array containing an
'error' key, and our only caller *only* consults the 'error' key. Then
the function returns null instead of an array, if the login succeeded!
I question why we bother returning the new SID if we never use it,
surely we could
I had this sitting around since December and forgot to send it in,
offered FWIW. It's slightly different in implementation and has more
wordy commit messages.
Eli Schwartz (2):
fix php 7.4 warnings
fix more php 7.4 warnings
web/lib/acctfuncs.inc.php | 1 +
web/lib/aur.inc.php | 28
Fix PHP notices such as "Trying to access array offset on value of type
bool" or "Trying to access array offset on value of type null".
Signed-off-by: Lukas Fleischer
---
web/html/login.php | 4 +++-
web/lib/aur.inc.php | 21 +
web/lib/pkgfuncs.inc.php | 3 +++
Signed-off-by: Lukas Fleischer
---
web/lib/aur.inc.php | 21 +
web/lib/pkgfuncs.inc.php | 3 +++
2 files changed, 24 insertions(+)
diff --git a/web/lib/aur.inc.php b/web/lib/aur.inc.php
index e9530fc..2507df6 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php