This document will be a reminder why most (/ almost all) frameworks out there just suck monkey balls.
Let's just make a nice list of all the really bad stuff that is happening in the popular frameworks.
And maybe publish it just to give people the shivers.
OR
might be just personal preference, but c'mon who usesOR
in PHP. And why would you?- Why no use Autoloader?
- We need more
eval()
. And wait, wut? What are weeval()
ing?
if ( ! isset($active_record) OR $active_record == TRUE)
{
require_once(BASEPATH.'database/DB_active_rec.php');
if ( ! class_exists('CI_DB'))
{
eval('class CI_DB extends CI_DB_active_record { }');
}
}
else
{
if ( ! class_exists('CI_DB'))
{
eval('class CI_DB extends CI_DB_driver { }');
}
}
Global variable variable? Really??
- Global is the cherry on top of the cake. Yay!
foreach (array($_GET, $_POST, $_COOKIE) as $global)
{
if ( ! is_array($global))
{
if ( ! in_array($global, $protected))
{
global $$global;
$$global = NULL;
}
}
else
{
foreach ($global as $key => $val)
{
if ( ! in_array($key, $protected))
{
global $$key;
$$key = NULL;
}
}
}
}
http://chat.stackoverflow.com/transcript/message/3612798#3612798
https://github.com/EllisLab/CodeIgniter/blob/develop/system/core/Loader.php#L853
http://chat.stackoverflow.com/transcript/message/3612873#3612873
https://github.com/EllisLab/CodeIgniter/blob/develop/system/helpers/smiley_helper.php#L78
http://chat.stackoverflow.com/transcript/message/3613051#3613051
Just...ugh.