From 30cceec6dc5100307c79381c9da08b3793ccf9bc Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 20 Nov 2009 12:17:31 +0000 Subject: [PATCH] fixing a problem regarding substr_count/mb_substr_count as they do not support the same number of parameters --- egw-pear/Net/IMAPProtocol.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/egw-pear/Net/IMAPProtocol.php b/egw-pear/Net/IMAPProtocol.php index e9e1952b57..b3eea9d577 100644 --- a/egw-pear/Net/IMAPProtocol.php +++ b/egw-pear/Net/IMAPProtocol.php @@ -2363,8 +2363,8 @@ class Net_IMAPProtocol { if ($str[$pos] === $startDelim) $delimCount++; if ($str[$pos] === $stopDelim) $delimCount--; if ($str[$pos] === $stopDelim && ($str[$pos+1] === $startDelim || ($str[$pos+1] === $stopDelim && $delimCount<=0))) { - $numOfQuotes = substr_count($str,'"',$startingpos); - $numOfMaskedQuotes = substr_count($str,'\"',$startingpos); + $numOfQuotes = substr_count(substr($str,$startingpos),'"'); + $numOfMaskedQuotes = substr_count(substr($str,$startingpos),'\"'); if ((($numOfQuotes - $numOfMaskedQuotes) % 2 ) == 0) { // quotes are balanced, so its unlikely that we meet a stop condition here as strings may contain )( //error_log(__METHOD__. "->Length: $len; NumOfQuotes: $numOfQuotes - NumofMaskedQuotes:$numOfMaskedQuotes #".$str."\n");