Skip to content

Conversation

psohm
Copy link

@psohm psohm commented May 3, 2017

PHP can be configured to show errors when $this->map[$this->method] is called
In this case, the user can see the name of the lib
It shouldn't show it for security reason :)

PHP can be configured to show errors when $this->map[$this->method] is called
In this case, the user can see the name of the lib
It shouldn't show it for security reason :)
@tyzoid
Copy link
Collaborator

tyzoid commented Jul 18, 2017

This essentially wraps the function in an if statement, which the if statement inside does anyway?

If you are worried about this segment causing errors visible to the user:

$urls = $this->map[$this->method];
if (!$urls) return null;

then it would be better to rewrite this to not generate a warning in the first place:

if (empty($this->map[$this-method])) return null;

I'd probably say that this isn't too great a concern, as production environments would hide these warnings anyway, but I may have misunderstood your intent.

@tyzoid tyzoid added the On Hold label Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants