Inverted comparison

This commit is contained in:
Stephen Abello
2026-02-19 16:27:42 +01:00
parent 829bc3bf42
commit c3cf07efc9

View File

@@ -362,7 +362,7 @@ class ormDocument
throw new Exception("Invalid id ($id) for class '$sClass' - the object does not exist or you are not allowed to view it");
}
}
if (($sSecretField != null) && (hash_equals($oObj->Get($sSecretField), $sSecretValue))) {
if (($sSecretField != null) && !hash_equals($oObj->Get($sSecretField), $sSecretValue)) {
throw new Exception("Invalid secret for class '$sClass' - the object does not exist or you are not allowed to view it");
}
/** @var \ormDocument $oDocument */