[geeklog-modules] Visitor-Stats
Tom Willett
tomw at pigstye.net
Tue Jan 14 08:02:59 EST 2003
Yes, that is a bug, but I do not remember the exact circumstances of its
appearing. To fix it I just tested for an array first. Thus replace:
--------------------
arsort($ref);
foreach ($ref as $key => $value) {
$retval .= '<a href="' . $refurl["$key"] . '">' . $key . '</a> - ' .
$value . '<br>';
}
----------------
with:
--------------
if (is_array($ref)) {
arsort($ref);
foreach ($ref as $key => $value) {
$retval .= '<a href="' . $refurl["$key"] . '">' . $key . '</a> -
' . $value . '<br>';
}
}
--------------
Or you can just grab the latest functions.inc from cvs at gplugs.
Tom
On Mon, 13 Jan 2003 23:13:45 -0600, Tony Bibbs wrote
> I have version 1.1 and after an install I get this:
>
> Warning: arsort() expects parameter 1 to be array, null given in
> /usr/www/tonybibbs/plugins/stats/functions.inc on line 476
>
> Warning: Invalid argument supplied for foreach() in
> /usr/www/tonybibbs/plugins/stats/functions.inc on line 477
>
> Upon inspection, my hunch is that this error results because I have not
> yet had a referral. Or am I missing something?
>
> --
> +-------------------+--------------------------------------------------+
> |Tony Bibbs |[R]egardless of what you may think of our penal |
> |tony at tonybibbs.com |system, the fact is that every man in jail is one |
> | |less potential fisherman to clutter up your |
> | |favorite pool or pond. --Ed Zern |
>
> +-------------------+--------------------------------------------------+
>
> _______________________________________________
> geeklog-modules mailing list
> geeklog-modules at lists.geeklog.net
> http://lists.geeklog.net/listinfo/geeklog-modules
--
Tom Willett
tomw at pigstye.net
More information about the geeklog-modules
mailing list