From 1a4dffc7bad04ec7677ce31410639747f9eb6e00 Mon Sep 17 00:00:00 2001 From: alex-brainstorm Date: Fri, 30 Apr 2004 23:18:18 +0000 Subject: [PATCH] Be smarter with PHP numerical conversion, who knows if the previous code wouldn't fail on some version git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@7334 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap_asearch.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/functions/imap_asearch.php b/functions/imap_asearch.php index 48ce5ead..be0b15f0 100644 --- a/functions/imap_asearch.php +++ b/functions/imap_asearch.php @@ -274,13 +274,13 @@ function sqimap_asearch_build_criteria($opcode, $what, $charset) if ($what != '') { switch (substr($what, -1)) { case 'G': - $what <<= 10; - //nobreak; + $what = substr($what, 0, -1) << 30; + break; case 'M': - $what <<= 10; - //nobreak; + $what = substr($what, 0, -1) << 20; + break; case 'K': - $what <<= 10; + $what = substr($what, 0, -1) << 10; break; } $criteria = $opcode . ' ' . $what . ' '; -- 2.25.1