mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Added function isEmptyString to fhc_helper
- Added function isEmptyArray to fhc_helper - Adapted the code in application/* to use as much as possible this two new functions - Removed the php function empty almost everywhere
This commit is contained in:
@@ -484,9 +484,9 @@ class DB_Model extends FHC_Model
|
||||
$tmpTable = trim($table);
|
||||
|
||||
// Check parameters
|
||||
if (empty($tmpTable)) return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR);
|
||||
if (isEmptyString($tmpTable)) return error(FHC_MODEL_ERROR, FHC_MODEL_ERROR);
|
||||
|
||||
if (!empty($alias))
|
||||
if (!isEmptyString($alias))
|
||||
{
|
||||
$tmpTable .= ' AS '.$alias;
|
||||
}
|
||||
@@ -586,7 +586,7 @@ class DB_Model extends FHC_Model
|
||||
$result = array();
|
||||
|
||||
// String that represents the pgsql array, better if not empty
|
||||
if (!empty($string))
|
||||
if (!isEmptyString($string))
|
||||
{
|
||||
// Magic convertion
|
||||
preg_match_all(
|
||||
@@ -742,7 +742,7 @@ class DB_Model extends FHC_Model
|
||||
$result = null;
|
||||
|
||||
// If the query is empty don't lose time
|
||||
if (!empty($query))
|
||||
if (!isEmptyString($query))
|
||||
{
|
||||
// If there are parameters to bind to the query
|
||||
if (is_array($parametersArray) && count($parametersArray) > 0)
|
||||
|
||||
Reference in New Issue
Block a user