[Tickets #4549] PHP4: str_split is missing in lib/Horde/IMAP/ACL/rfc2086.php

bugs@bugs.horde.org bugs at bugs.horde.org
Sun Oct 22 10:08:57 PDT 2006


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=4549
-----------------------------------------------------------------------
 Ticket             | 4549
 Created By         | jonathan at tietznet.de
 Summary            | PHP4: str_split is missing in lib/Horde/IMAP/ACL/rfc2086.php
 Queue              | Horde Framework Packages
 Version            | FRAMEWORK_3
 Type               | Bug
 State              | Unconfirmed
 Priority           | 2. Medium
 Owners             | 
-----------------------------------------------------------------------


jonathan at tietznet.de (2006-10-22 10:08) wrote:

Hi,

i use php4. In php4 the function str_split is missing, but this func is
required for lib/Horde/IMAP/ACL/rfc2086.php, so i added this func to
rfc2086.php:

if(!function_exists('str_split')){
   function str_split($string,$split_length=1){
       $count = strlen($string); 
       if($split_length < 1){
           return false; 
       } elseif($split_length > $count){
           return array($string);
       } else {
           $num = (int)ceil($count/$split_length); 
           $ret = array(); 
           for($i=0;$i<$num;$i++){ 
               $ret[] = substr($string,$i*$split_length,$split_length); 
           } 
           return $ret;
       }     
   } 
}

see http://de.php.net/str_split

horde: 3.1.2
imp: 4.1.1
php: 4.3.10
debian linux




More information about the bugs mailing list