Thomas Sutton | 30 Jun 09:33

Bug in inc/statistiques.php for SPIP 2.0.8

Hi all,

There appears to be a bug in the file `inc/statistiques.php`.  
Sometimes it outputs "Array" after the total (see screenshot):

> total: 203Array

`$liste` in http://doc.spip.org/ <at> statistiques_tous can be `array()`.  
So `if ($liste)` does the `else` branch
<http://trac.rezo.net/trac/spip/browser/branches/spip-2.0/ecrire/inc/statistiques.php#L202 
 >, which does not change `$liste`. `$liste` is then converted to a  
string
<http://trac.rezo.net/trac/spip/browser/branches/spip-2.0/ecrire/inc/statistiques.php#L223 
 > and, later, printed.

To fix it, I add `$liste = "";` on line 215
<http://trac.rezo.net/trac/spip/browser/branches/spip-2.0/ecrire/inc/statistiques.php#L215 
 >.

I am not sure if this affects trunk as well.

Cheers,

Thomas Sutton

bouncingorange
graphic+web design

Fil | 17 Aug 10:13
Favicon
Gravatar

Re: Bug in inc/statistiques.php for SPIP 2.0.8

Hi Thomas,

I think [14399] fixes this. Thank you.

On Tue, Jun 30, 2009 at 9:33 AM, Thomas
Sutton<thomas@...> wrote:

> Hi all, > > There appears to be a bug in the file `inc/statistiques.php`. Sometimes it > outputs "Array" after the total (see screenshot): > >> total: 203Array
-- Fil
Thomas Sutton | 30 Jun 09:33

Bug in inc/statistiques.php for SPIP 2.0.8

Hi all,

There appears to be a bug in the file `inc/statistiques.php`.  
Sometimes it outputs "Array" after the total (see screenshot):

> total: 203Array

`$liste` in http://doc.spip.org/ <at> statistiques_tous can be `array()`.  
So `if ($liste)` does the `else` branch
<http://trac.rezo.net/trac/spip/browser/branches/spip-2.0/ecrire/inc/statistiques.php#L202 
 >, which does not change `$liste`. `$liste` is then converted to a  
string
<http://trac.rezo.net/trac/spip/browser/branches/spip-2.0/ecrire/inc/statistiques.php#L223 
 > and, later, printed.

To fix it, I add `$liste = "";` on line 215
<http://trac.rezo.net/trac/spip/browser/branches/spip-2.0/ecrire/inc/statistiques.php#L215 
 >.

I am not sure if this affects trunk as well.

Cheers,

Thomas Sutton

bouncingorange
graphic+web design


Gmane