Skip to content

Commit 5c9ba61

Browse files
Jiaming Youmeta-codesync[bot]
authored andcommitted
Added empty string check to $normalizedPII
Summary: Added empty string check to $normalizedPII Differential Revision: D84121376 fbshipit-source-id: 65163f84c5da446374562573e2df12673be868ab
1 parent 93fe3da commit 5c9ba61

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

php/capi-param-builder/src/piiUtil/PIIUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static function getNormalizedAndHashedPII($piiValue, $dataType)
7575
return mb_strtolower($piiValue) . '.' . LANGUAGE_TOKEN;
7676
} else {
7777
$normalizedPII = PIIUtils::getNormalizedPII($piiValue, $dataType);
78-
if ($normalizedPII === null) {
78+
if ($normalizedPII === null || $normalizedPII === '') {
7979
return null;
8080
}
8181
return hash('sha256', $normalizedPII) . '.' . LANGUAGE_TOKEN;

0 commit comments

Comments
 (0)