Closed REBELinBLUE closed 7 years ago
@REBELinBLUE makes sense adding info to the server block if the info is server specific, thanks :) Just few things :
Can you append the extra server stats in the 'Server Environment' box on the UI as well just like in the markdown
I will look at that
Also, add the check for empty array before both as I have done with extraStats so that if there are no extra server stats the heading is not visible as well.
Which extra header do you mean? I might have missed something. There is only an extra foreach so if the array is empty it won't be outputting anything extra
@REBELinBLUE oops! I was reading that in the context of an entire new block, my mistake. Just add the server stats in the UI box and we are good to go.
PS: Also, since I am not that experienced with PHP as you are obviously so is doing foreach over a blank array safe? I know it wont generate any error, just curious would that create a suppressed warning or sort of something like that? Just curious to learn :)
Will do!
It won't cause an error provided the array is initialised as empty to begin with, i.e. $var = [];
or $var = array();
if you just did something like foreach ($foo as $bar)
you would get a notice because $foo
isn't even an empty array
@REBELinBLUE ah! Thanks. I have merged the PR & will add the stats in the box myself as I am going to do the same for Laravel Env as well. Cheers for the nice suggestion :beers:
UPDATE: Docs updated & Release Pushed: v1.2.1
Oh, did you not want me adding it to the box on the right hand side then?
Ah!
Allows you to register additional PHP extensions to appear in the server information section, also cleaned up a few inconsistencies