Code Duplication    Length = 7-7 lines in 2 locations

catalog/admin/includes/functions/general.php 1 location

@@ 1365-1371 (lines=7) @@
1362
  }
1363
1364
// nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n)
1365
  function tep_convert_linefeeds($from, $to, $string) {
1366
    if ((PHP_VERSION < "4.0.5") && is_array($from)) {
1367
      return preg_replace('/(' . implode('|', $from) . ')/', $to, $string);
1368
    } else {
1369
      return str_replace($from, $to, $string);
1370
    }
1371
  }
1372
1373
  function tep_string_to_int($string) {
1374
    return (int)$string;

catalog/includes/functions/general.php 1 location

@@ 1385-1391 (lines=7) @@
1382
  }
1383
1384
// nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n)
1385
  function tep_convert_linefeeds($from, $to, $string) {
1386
    if ((PHP_VERSION < "4.0.5") && is_array($from)) {
1387
      return preg_replace('/(' . implode('|', $from) . ')/', $to, $string);
1388
    } else {
1389
      return str_replace($from, $to, $string);
1390
    }
1391
  }
1392
?>
1393