Skip to content
Snippets Groups Projects
Unverified Commit db21865c authored by Pavel Vyskočil's avatar Pavel Vyskočil
Browse files

Fixed bad checks before insert translation to db

parent 0b0a8aef
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
## [Unreleased]
[Fixed]
- Statistics will be now full screen
- Fixed bad checks before insert translation to db
## [v1.4.0]
[Added]
......
......@@ -39,13 +39,13 @@ class DatabaseCommand
SimpleSAML\Logger::error("The login log wasn't inserted into into table: " . $serviceProvidersTableName . ".");
}
if (is_null($idpName) || empty($idpName)) {
if (!is_null($idpName) && !empty($idpName)) {
$stmt->prepare("INSERT INTO " . $identityProvidersMapTableName . "(entityId, name) VALUES (?, ?) ON DUPLICATE KEY UPDATE name = ?");
$stmt->bind_param("sss", $idpEntityID, $idpName, $idpName);
$stmt->execute();
}
if (is_null($spName) || empty($spName)) {
if (!is_null($spName) && !empty($spName)) {
$stmt->prepare("INSERT INTO " . $serviceProvidersMapTableName . "(identifier, name) VALUES (?, ?) ON DUPLICATE KEY UPDATE name = ?");
$stmt->bind_param("sss", $spEntityId, $spName, $spName);
$stmt->execute();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment