[Vtigercrm-developers] Bug in the vtiger 6.1 beta SVN 14208 - undefined variable in foreach loop

Prasad prasad at vtiger.com
Wed Aug 13 19:33:03 GMT 2014


Thanks for the quick alert - the code was removed.

*Connect with us on: *Twitter <http://twitter.com/vtigercrm> *I* Facebook
<http://www.facebook.com/pages/vtiger/226866697333578?sk=wall> *I* Blog
<https://blogs.vtiger.com/>* I* Wiki
<http://wiki.vtiger.com/index.php/Main_Page> *I *Forums
<https://discussions.vtiger.com>*I* Website <https://www.vtiger.com/>


On Thu, Aug 14, 2014 at 12:31 AM, Holbok István <holbok at gmail.com> wrote:

>  Dear vtiger Team,
>
> I have just tried to install a new SVN 14208 vtiger 6.1 beta.
> The install script shows the following warning:
>
> Warning: Invalid argument supplied for foreach() in
> ....\modules\Vtiger\helpers\Util.php on line 683
>
> Looking at this line I have found that the *$activityIds* variable used
> in the foreach loop is undefined. It is obviously a bug.
>
>     public static function checkDbUTF8Support($conn) {
>         global $db_type;
>         if($db_type == 'pgsql')
>             return true;
>         $dbvarRS = $conn->Execute("show variables like '%_database' ");
>         $db_character_set = null;
>         $db_collation_type = null;
>         while(!$dbvarRS->EOF) {
>             $arr = $dbvarRS->FetchRow();
>             $arr = array_change_key_case($arr);
>             switch($arr['variable_name']) {
>                 case 'character_set_database' : $db_character_set =
> $arr['value']; break;
>                 case 'collation_database'     : $db_collation_type =
> $arr['value']; break;
>             }
>
>            * foreach($activityIds as $activityId=>$color) {*  *// = line
> 683*
>                 $db->pquery('INSERT INTO
> vtiger_calendar_user_activitytypes (id, defaultid, userid, color) VALUES
> (?,?,?,?)', array($db->getUniqueID('vtiger_calendar_user_activitytypes'),
> $activityId, $userId, $color));
>             }
>         }
>         return (stristr($db_character_set, 'utf8') &&
> stristr($db_collation_type, 'utf8'));
>     }
>
> Kindest regards:
> István
>
> --
> üdvözlettel:
>
> *Holbok István*
>
> +3670-342-0900
> *e-mail:* holbok at gmail.com
> *SkyPe:* holboki
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140814/c123f45d/attachment-0001.html>


More information about the vtigercrm-developers mailing list