Permalink
Browse files

Removing old support for php 4.2 (since 2003)

  • Loading branch information...
1 parent 8af19d9 commit 3aa4a76ad4aec148694d397a0fac9a16ea2abf3a @acidvertigo acidvertigo committed Aug 17, 2011
Showing with 3 additions and 11 deletions.
  1. +3 −6 catalog/admin/includes/functions/general.php
  2. +0 −5 catalog/includes/functions/general.php
View
9 catalog/admin/includes/functions/general.php
@@ -1359,14 +1359,11 @@ function tep_rand($min = null, $max = null) {
}
}
-// nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n)
+
function tep_convert_linefeeds($from, $to, $string) {
- if ((PHP_VERSION < "4.0.5") && is_array($from)) {
- return preg_replace('/(' . implode('|', $from) . ')/', $to, $string);
- } else {
- return str_replace($from, $to, $string);
+ return str_replace($from, $to, $string);
}
- }
+
function tep_string_to_int($string) {
return (int)$string;
View
5 catalog/includes/functions/general.php
@@ -1358,12 +1358,7 @@ function tep_count_customer_address_book_entries($id = '', $check_session = true
return $addresses['total'];
}
-// nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n)
function tep_convert_linefeeds($from, $to, $string) {
- if ((PHP_VERSION < "4.0.5") && is_array($from)) {
- return preg_replace('/(' . implode('|', $from) . ')/', $to, $string);
- } else {
return str_replace($from, $to, $string);
}
- }
?>

0 comments on commit 3aa4a76

Please sign in to comment.