Problem: operator sum is giving me an array

Author Message

Shurbann Martes

Monday 06 October 2003 6:12:17 am

The arithemtic operator:

{sum (3,1)}

is giving me as output "Array"

Is this a bug or am I using it the wrong way?

Shurbann

Ole Morten Halvorsen

Monday 06 October 2003 6:29:59 am

which eZ publish version are you using?

look here: http://ez.no/content/view/full/33923

Senior Software Engineer - Vision with Technology

http://www.visionwt.com
http://www.omh.cc
http://www.twitter.com/omh

eZ Certified Developer
http://ez.no/certification/verify/358441
http://ez.no/certification/verify/272578

Kent Wakely

Monday 06 October 2003 2:07:11 pm

OK. So I've downloaded the latest 3.2-1 stable and the bug is still present there. How do we get access to a release with the bug fixed?

Paul Borgermans

Tuesday 07 October 2003 9:35:51 am

what gives {array(3,1)|sum} ?

http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/operators/array_handling#sum

If that is still not right, check your php version as there is a bug with array_sum in versions < 4.2.1 (if some elements are strings)

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Paul Borgermans

Tuesday 07 October 2003 12:23:55 pm

EDIT: wrong wrong, need to learn to read from left to right

---------------cut or ignore--------------
Ah,

The fix did not make it into 3.2-1

http://pubsvn.ez.no/viewcvs/stable/3.2/lib/eztemplate/classes/eztemplatearrayoperator.php

still has the wrong one

Go to
http://pubsvn.ez.no/viewcvs/trunk/lib/eztemplate/classes/eztemplatearrayoperator.php

and click the link to:

Diff to previous 3426

To know what to add (or download the file from the svn repository)
----------------cut----------------------------------
-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.