Welcome Guest, Not a member yet? Register   Sign In
Suggestion for the Core input class
#1

[eluser]predi[/eluser]
Every time i start a project, the first thing i do is open 'system/core/Input.php' and change the _fetch_from_array() method

from:
Code:
if(!isset($array[$index]))
{
return FALSE;
}
to:
Code:
if(!isset($array[$index]))
{
return NULL;
}

Why? Pretty simple:
1. i wanna use isset() in my controllers for fast check if params passed
2. false is ambiguous as post/get params can pass the value of false.

So, my question is WHY the method returns FALSE instead of NULL?
The version is 2.1.3 and i still see the code unchanged. What's the sacred point in returning false?
Imho, CI should switch to NULL instead.
#2

[eluser]Aken[/eluser]
This change has already been incorporated into the 3.0 development repo on Github. Smile
#3

[eluser]predi[/eluser]
[quote author="Aken" date="1354004423"]This change has already been incorporated into the 3.0 development repo on Github. Smile[/quote]
Ough, awesome!
Any early release date announcement? Wink

ps: btw, will you add a 'add comment' to the Zip Encoding Class? i.e. will you implement the ZipArchive:ConfusedetArchiveComment() method? Thx
#4

[eluser]Aken[/eluser]
3.0 development is publicly available on Github: https://github.com/EllisLab/CodeIgniter While not yet a stable release, you can download and test it at your own discretion. There's no set release date, but it isn't too far away.

As for the Zip Encoding Class, I have no experience with that. If you want to see what has changed, and/or potentially contribute those changes yourself, check out the repository.




Theme © iAndrew 2016 - Forum software by © MyBB