Skip to content

Commit

Permalink
add 5.2 version requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
gplv2 committed Jan 6, 2013
1 parent d7666c5 commit 6b563e8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions check_solr_slave.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
ini_set("memory_limit","500M");
set_time_limit(0);

/* Check if PHP version is sufficient for the things we use here
$phpVersion = phpversion();
if (function_exists("version_compare") && version_compare($phpVersion, "5.3.0",'<')) {
/* Check if PHP version is sufficient for the things we use here */
$phpVersion = phpversion();
if (function_exists("version_compare") && version_compare($phpVersion, "5.2.0",'<')) {
die("Sorry! Your PHP version is too old. PEAR and this script requires at least PHP 5.3.0 for stable operation.");
}*/
}

// working dir
$base= realpath( dirname(__FILE__));
Expand Down Expand Up @@ -110,8 +110,8 @@ function check_slave($buf, $options) {
}
else if (preg_last_error() == PREG_BAD_UTF8_ERROR) {
print 'Bad UTF8 error!';
}
else if (preg_last_error() == PREG_BAD_UTF8_ERROR) {
} else if (preg_last_error() == PREG_BAD_UTF8_OFFSET_ERROR) {
// From php 5.3.0 onwards
print 'Bad UTF8 offset error!';
}
exit();
Expand Down

0 comments on commit 6b563e8

Please sign in to comment.