26
Yes, I can actually give you a better example with the core that had me baffled for 5 hours and if the @ hadn't been used I would have fixed the problem in about 1 minute.
$this->path_basic = XOOPS_ROOT_PATH . "/class/captcha";
$this->path_plugin = XOOPS_ROOT_PATH . "/Frameworks/captcha";
function loadConfig($filename = null)
{
$filename = empty($filename) ? "config.php" : "config.{$filename}.php";
$config = @include "{$this->path_basic}/{$filename}";
if ($config_plugin = @include "{$this->path_plugin}/{$filename}") {
foreach ($config_plugin as $key => $val) {
$config[$key] = $val;
}
}
return $config;
}
As you can see, both paths have been suppressed and note the second line is a call to the Framework folders. Here we are making the framework a requirement of the core and not the other way around.
The code that was in the framework was to include a language file and wouldn't be considered a requirement. But the code was something like this:
if (!@include '/path/to/language/file.php') {
require '/path/to/language/file.php';
}
With all the error suppression and the system failing to find the required file, all that happens is that we end up with a white page and even error debugging turned on and nothing to show where the problem lies.
I agree this practice should be banned from the core along with this baby and it's still used within the core code.
foreach ($_POST as $k => $v ){
$kk = $v;
}
Catz