From 6447bf83d23c21651dec67a56950546dd0e0e2bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20K=C5=82ys?= Date: Wed, 24 Apr 2019 14:48:12 +0200 Subject: [PATCH] Update PossibleIncorrectComparisonWithNull.md Fixed typo --- RuleDocumentation/PossibleIncorrectComparisonWithNull.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RuleDocumentation/PossibleIncorrectComparisonWithNull.md b/RuleDocumentation/PossibleIncorrectComparisonWithNull.md index d12f77a96..d0e186521 100644 --- a/RuleDocumentation/PossibleIncorrectComparisonWithNull.md +++ b/RuleDocumentation/PossibleIncorrectComparisonWithNull.md @@ -7,7 +7,7 @@ To ensure that PowerShell performs comparisons correctly, the `$null` element should be on the left side of the operator. There are a number of reasons why this should occur: -* `$null` is a scalar. When the input (left side) to an operator is a scalar value, comparison operators return a Boolean value. When the input is a collection of values, the comparison operators return any matching values, or an empty array if there are no matches in the collection. The only way to reliably check if a value is `$null` is to place `$null` on the left side of the operator so that a scalar comparison is perfomed. +* `$null` is a scalar. When the input (left side) to an operator is a scalar value, comparison operators return a Boolean value. When the input is a collection of values, the comparison operators return any matching values, or an empty array if there are no matches in the collection. The only way to reliably check if a value is `$null` is to place `$null` on the left side of the operator so that a scalar comparison is performed. * PowerShell will perform type casting left to right, resulting in incorrect comparisons when `$null` is cast to other scalar types. ## How