• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PR - PHP Standard anomalies

#1
@ 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) )
download and make your system directory strict
Reply

#2
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.
Support Development  • Practical CodeIgniter 3  •
Myth:AuthVulcan - CLI Tools for CI4
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.