mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 05:22:35 +09:00
Guard more count() calls in common framework classes
This commit is contained in:
parent
3dbc600aa9
commit
e3a2c1a6aa
3 changed files with 3 additions and 3 deletions
|
|
@ -104,7 +104,7 @@ class ConfigParser
|
||||||
$config['db']['master']['engine'] = 'myisam';
|
$config['db']['master']['engine'] = 'myisam';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($db_info->slave_db) && count($db_info->slave_db))
|
if (isset($db_info->slave_db) && is_array($db_info->slave_db) && count($db_info->slave_db))
|
||||||
{
|
{
|
||||||
foreach ($db_info->slave_db as $slave_id => $slave_db)
|
foreach ($db_info->slave_db as $slave_id => $slave_db)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ class LangParser
|
||||||
foreach ($items as $item)
|
foreach ($items as $item)
|
||||||
{
|
{
|
||||||
$name = strval($item['name']);
|
$name = strval($item['name']);
|
||||||
if (count($item->item))
|
if (@count($item->item))
|
||||||
{
|
{
|
||||||
$lang[$name] = array();
|
$lang[$name] = array();
|
||||||
self::_toArray($item->item, $lang[$name], $language);
|
self::_toArray($item->item, $lang[$name], $language);
|
||||||
|
|
|
||||||
|
|
@ -240,7 +240,7 @@ class Session
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start the session if it contains data.
|
// Start the session if it contains data.
|
||||||
if ($force || (count($_SESSION) && !headers_sent()))
|
if ($force || (@count($_SESSION) && !headers_sent()))
|
||||||
{
|
{
|
||||||
// Copy session data to a temporary array.
|
// Copy session data to a temporary array.
|
||||||
$temp = $_SESSION;
|
$temp = $_SESSION;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue