spjeff / spbestwarmup

Tired of waiting for SharePoint pages to load? Want something easy to support? That works on all versions? This warmup script is for you!
2 stars 0 forks source link

The $global:msg variable isn't initialized #32

Closed Struijky closed 3 years ago

Struijky commented 3 years ago

The $global:msg variable isn't initialized. This will give an error while writing the message to the Event Log when SPBEstWarmUp.ps1 is ran multiple times in the PowerShell console window. I suggest to initialize the variable to an empty string in the main section of the script to prevent this.

spjeff commented 3 years ago

Thank you Struijky. Great suggestion Updated PS1 with code change.

spjeff commented 3 years ago

Updated at https://github.com/spjeff/spbestwarmup/commit/27d04f04e9c1a96eb128edce1161f70dc52efd3a#diff-13f1021d544874b5cf340e171b1a24f5e973a9cd9fa5d5b4cecd482a2966fc25

Struijky commented 3 years ago

Hi Jeff,

Good to hear I could help.

Best regrads,

Hans Struijk

Senior SharePoint Consultant, Architect Spoormakerserf 91 5706 KX Helmond +31 (0) 6 13326926 info@sigylon.nlmailto:info@sigylon.nl [cid:image002.png@01D6D90B.72521D20]

From: Jeff Jones notifications@github.com Sent: dinsdag 22 december 2020 23:53 To: spjeff/spbestwarmup spbestwarmup@noreply.github.com Cc: Hans Struijk (Sigylon) info@sigylon.nl; Author author@noreply.github.com Subject: Re: [spjeff/spbestwarmup] The $global:msg variable isn't initialized (#32)

Thank you Struijky. Great suggestion Updated PS1 with code change.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/spjeff/spbestwarmup/issues/32#issuecomment-749820384, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFQAZHDRZ4NWRRAJXGN5SOTSWEPN3ANCNFSM4VFSRFCQ.