Welcome Guest, Not a member yet? Register   Sign In
Reactor Engineers
#1

[eluser]wiredesignz[/eluser]
Why are you allowing code into Reactor that has not been checked for any type of logic or quality control.

bubbafoley has recently submitted code that contains the php error suppressing @ symbol in his update for config ENVIRONMENT checking. The code immediately prior to this does a file_exists check and error suppressing is totally pointless in this case.

Your lack of quality control is embarrassing for me to read and disrespectful to this community.

If you allow this garbage into Reactor what else is going to get in?

Sort it out.
#2

[eluser]KarlBallard[/eluser]
I personally feel if you need to suppress an error, you're doing it wrong.
#3

[eluser]Eric Barnes[/eluser]
I just did a pull request for it last night - https://bitbucket.org/ellislab/codeignit...59b4fe50d6

I spotted the removal of the @ but didn't notice it was still added in other places. My mistake and will get that sorted.
#4

[eluser]bubbafoley[/eluser]
well the error suppression was already in there. all i did was add a check for the environment specific config and then included the config file the same way it was previously included. didn't even think to remove the @s. my bad. thanks for fixing Eric.
#5

[eluser]wiredesignz[/eluser]
It is never good practice to code using the @ error suppressor unless you have no control over the outcome of the command. ie: When checking php.ini values. Otherwise you're just being lazy.

All other cases you should provide adequate checks before executing code.

The code in that update already checks that the ENVIRONMENT directory files exist, so how difficult is it to add further checks for files in the config directory rather than just "hacking" a solution into Reactor?

If config files are missing then an error should probably be generated in any case. But that is a decision for the development team to discuss.
#6

[eluser]n0xie[/eluser]
Speaking of quality control, why was file_exists() used and not is_file() ?

file_exists() will evaluate to TRUE for directories, which I'm pretty sure is unwanted behaviour.




Theme © iAndrew 2016 - Forum software by © MyBB