You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for script 'ConvertFrom-SourceTable.ps1'
Great work! :-)
In my project I use StrictMode Version 3.0 and I see that function 'ConvertFrom-SourceTable' throw 'Index was outside the bounds of the array' exception.
Simple example below:
PS C:\> Set-StrictMode -Version 2
PS C:\> . .\ConvertFrom-SourceTable.ps1
PS C:\> ConvertFrom-SourceTable '
>> Name Age
>> ---- ----
>> John 18
>> Sam 22
>> ' -ErrorAction stop
Name Age
---- ---
John 18
Sam 22
PS C:\> Set-StrictMode -Version 3
PS C:\> ConvertFrom-SourceTable '
>> Name Age
>> ---- ----
>> John 18
>> Sam 22
>> ' -ErrorAction stop
Foreach-Object : Index was outside the bounds of the array.
At C:\ConvertFrom-SourceTable.ps1:377 char:90
+ ... Skip $DataIndex | Where-Object {$_.Trim()} | Foreach-Object {Mask $_}
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [ForEach-Object], IndexOutOfRangeException
+ FullyQualifiedErrorId : System.IndexOutOfRangeException,Microsoft.PowerShell.Commands.ForEachObjectCommand
PS C:\>
The text was updated successfully, but these errors were encountered:
Apparently I was implicitly relying on the behavior that an index outside the bounds of the array returns $Null with statements like $Array[$i] -notmatch '\S' (vs. $Array[$i] -match '\s').
Anyways, it should be fixed now in version 0.3.15
Hi!
Thank you for script 'ConvertFrom-SourceTable.ps1'
Great work! :-)
In my project I use StrictMode Version 3.0 and I see that function 'ConvertFrom-SourceTable' throw 'Index was outside the bounds of the array' exception.
Simple example below:
The text was updated successfully, but these errors were encountered: