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.

eZ debug

Timing: Jan 18 2025 15:57:25
Script start
Timing: Jan 18 2025 15:57:25
Module start 'layout'
Timing: Jan 18 2025 15:57:25
Module start 'content'
Timing: Jan 18 2025 15:57:25
Module end 'content'
Timing: Jan 18 2025 15:57:25
Script end

Main resources:

Total runtime0.0185 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 589.4766152.6406
Module start 'layout' 0.00560.0036 742.117239.4766
Module start 'content' 0.00910.0071 781.593893.3672
Module end 'content' 0.01620.0022 874.960934.3047
Script end 0.0184  909.2656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002614.3082140.0002
Check MTime0.00116.0650140.0001
Mysql Total
Database connection0.00073.691910.0007
Mysqli_queries0.003318.082730.0011
Looping result0.00000.076110.0000
Template Total0.00179.310.0017
Template load0.00094.920410.0009
Template processing0.00084.330710.0008
Override
Cache load0.00063.339610.0006
General
dbfile0.002312.394580.0003
String conversion0.00000.042640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs