Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix and better check

  • Loading branch information...
commit fae6504cc04125115ace85e35f661d64dad05b50 1 parent 3b63efb
Luca acidvertigo authored
Showing with 14 additions and 14 deletions.
  1. +14 −14 catalog/includes/functions/general.php
28 catalog/includes/functions/general.php
View
@@ -1142,20 +1142,20 @@ function tep_array_to_string($array, $exclude = '', $equals = '=', $separator =
}
function tep_not_null($value) {
- if (is_array($value) && (is_array($value))) {
- if (sizeof($value) > 0) {
- return true;
- } else {
- return false;
- }
- } else {
- if (($value != '') && (strtolower($value) != 'null') && (strlen(trim($value)) > 0)) {
- return true;
- } else {
- return false;
- }
- }
- }
+ if (is_array($value)) {
+ if (count($value) > 0) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ if (!empty($value) && !is_null($value) && (strlen(trim($value)) > 0)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
////
// Output the tax percentage with optional padded decimals
Please sign in to comment.
Something went wrong with that request. Please try again.