From: Tyler A. <fi...@us...> - 2001-04-19 20:58:19
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory usw-pr-cvs1:/tmp/cvs-serv20197 Modified Files: strings.php Log Message: * Potential fix for Win32 builds where 'getrusage' is a function but is not supported. I ignore the warning and check the result to make sure it is an array. Index: strings.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/strings.php,v retrieving revision 1.100 retrieving revision 1.101 diff -u -w -r1.100 -r1.101 --- strings.php 2001/04/19 17:57:28 1.100 +++ strings.php 2001/04/19 20:58:16 1.101 @@ -368,13 +368,17 @@ // getrusage if (function_exists('getrusage')) { - $dat = getrusage(); + // Avoid warnings with Win32 + $dat = @getrusage(); + if (isset($dat) && is_array($dat)) + { $Str = ''; foreach ($dat as $k => $v) { $Str .= $k . $v; } sq_mt_seed(md5($Str)); + } } // Apache-specific |