MaxJSONSize and MaxXMLSize must be greater than zero
Hello,
I have thoroughly enjoyed watching almost all of your courses on Udemy. First and foremost, thank you very, very much for these valuable lessons.
I was following your Tools package course, and a question arose in my mind regarding Json. Therefore, I forked the Toolbox project and tested the issue that puzzled me.
It seems that if MaxJSONSize and MaxXMLSize values are not equal to zero, they are being paired with defaultMaxUpload. In the tests, since these values are always positive numbers, the tests were successful. However, when a negative value was entered, it was not equal to zero, so the entered negative value was assigned, causing the tests to fail.
Therefore, instead of checking whether MaxJSONSize and MaxXMLSize values are equal to zero, I checked whether they are greater than zero. This way, even if a negative value is entered, the tests are successful. Of course, alternatively, it could be considered to return an error by checking whether MaxJSONSize and MaxXMLSize values are less than zero. You know better which approach is more effective.
Since there is no explanation about contributing, I hesitated about the pull request. Nevertheless, I thought I would try my luck.
Hi @tsawler
I integrated the InArray and LoadSQLQueries methods into the tools package.
InArray can check if the searched key exists in all arrays, regardless of their type.
LoadSQLQueries allows us to use SQL codes in SQL files instead of using them in code, thus avoiding code pollution.
I thought it would be good to have them in a toolbox.
Thanks for this. I'll give it a look as soon as I can.