PR - PHP Standard anomalies |
@ kilishan
https://forum.codeigniter.com/thread-743...#pid367516 Quote:You are free to submit a PR for that, of course. However the integer '1' is typecast to the string '1' when strict is not defined so it's not strictly necessary, but no harm being proper on that. PR #1 # ini_set() expects parameter 2 to be string, integer given file: app/Config/Boot/development.php - line # 11 # ini_set('display_errors', 1); ini_set('display_errors', '1'); PR #2 # ini_set() expects parameter 2 to be string, integer given file: app/Config/Boot/production.php - line # 10 # ini_set('display_errors', 1); ini_set('display_errors', '1'); PR #3 # strlen() expects parameter string, integer given file: system/Debug/exceptions.php - line # 466 # $format = '% ' . strlen($start + $lines) . 'd'; $format = '% ' . strlen(sprintf('%sd', $start + $lines)); PR #4 # DateTime::createFromFormat() expects string, integer given file: system/HTTP/Response.php - line # 717 # $this->setDate(\DateTime::createFromFormat('U', time())); $this->setDate(\DateTime::createFromFormat('U', (string) time())); // John added (string) PR #5 # switch() parameter expects string, NULL given file: system/HTTP/Request.php - line # 237 # switch (strtolower($which) ) switch (strtolower( (string) $which) )
Hey John, Thanks for finding those.
However, that's not a proper pull request. What I meant was you can submit pull requests over at GitHub. That makes it simple for me to look at it and see the tests still pass, everything works, and all I have to do is click "merge". Much more likely to get the code changed that way. We are already so swamped with commitments that anything you can do to make things simpler for us to ensure it's good code, works in the overall context, and is something we think benefits the framework, is more likely to make changes actually happen. |
Welcome Guest, Not a member yet? Register Sign In |