Permalink
Browse files

Fix and better check

  • Loading branch information...
1 parent 3b63efb commit fae6504cc04125115ace85e35f661d64dad05b50 @acidvertigo acidvertigo committed Mar 29, 2012
Showing with 14 additions and 14 deletions.
  1. +14 −14 catalog/includes/functions/general.php
@@ -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

0 comments on commit fae6504

Please sign in to comment.