Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 8b39bc1

Browse files
committed
Fixed bad checks before insert translation to db
1 parent 25a949c commit 8b39bc1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
44
## [Unreleased]
55
[Fixed]
66
- Statistics will be now full screen
7+
- Fixed bad checks before insert translation to db
78

89
## [v1.4.0]
910
[Added]

lib/Auth/Process/DatabaseCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ public static function insertLogin(&$request, &$date)
3939
SimpleSAML\Logger::error("The login log wasn't inserted into into table: " . $serviceProvidersTableName . ".");
4040
}
4141

42-
if (is_null($idpName) || empty($idpName)) {
42+
if (!is_null($idpName) && !empty($idpName)) {
4343
$stmt->prepare("INSERT INTO " . $identityProvidersMapTableName . "(entityId, name) VALUES (?, ?) ON DUPLICATE KEY UPDATE name = ?");
4444
$stmt->bind_param("sss", $idpEntityID, $idpName, $idpName);
4545
$stmt->execute();
4646
}
4747

48-
if (is_null($spName) || empty($spName)) {
48+
if (!is_null($spName) && !empty($spName)) {
4949
$stmt->prepare("INSERT INTO " . $serviceProvidersMapTableName . "(identifier, name) VALUES (?, ?) ON DUPLICATE KEY UPDATE name = ?");
5050
$stmt->bind_param("sss", $spEntityId, $spName, $spName);
5151
$stmt->execute();

0 commit comments

Comments
 (0)