stripos() not present in PHP4, thanks to Sebastian
This commit is contained in:
@@ -66,6 +66,11 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
|
|||||||
}
|
}
|
||||||
// Current length of our buffer
|
// Current length of our buffer
|
||||||
$len = strlen($buffer);
|
$len = strlen($buffer);
|
||||||
|
// prepare an uppercase copy of buffer for PHP < 5
|
||||||
|
// outside of the loop
|
||||||
|
if (PMA_PHP_INT_VERSION < 50000) {
|
||||||
|
$buffer_upper = strtoupper($buffer);
|
||||||
|
}
|
||||||
// Grab some SQL queries out of it
|
// Grab some SQL queries out of it
|
||||||
while ($i < $len) {
|
while ($i < $len) {
|
||||||
$found_delimiter = false;
|
$found_delimiter = false;
|
||||||
@@ -109,7 +114,11 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
|
|||||||
$p7 = $big_value;
|
$p7 = $big_value;
|
||||||
}
|
}
|
||||||
// catch also "delimiter"
|
// catch also "delimiter"
|
||||||
|
if (PMA_PHP_INT_VERSION >= 50000) {
|
||||||
$p8 = stripos($buffer, 'DELIMITER', $i);
|
$p8 = stripos($buffer, 'DELIMITER', $i);
|
||||||
|
} else {
|
||||||
|
$p8 = strpos($buffer_upper, 'DELIMITER', $i);
|
||||||
|
}
|
||||||
if ($p8 === FALSE || $p8 >= ($len - 11) || $buffer[$p8 + 9] > ' ') {
|
if ($p8 === FALSE || $p8 >= ($len - 11) || $buffer[$p8 + 9] > ' ') {
|
||||||
$p8 = $big_value;
|
$p8 = $big_value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user