Path

ez projects / ezjscore / forum / general / problem with last commit to...


Problem with last commit to trunk.

You need to be logged in to post messages in the forums. New users may register here.

Carlos Revillo

Member since:
31 January 2007

Posts: 53

Tuesday 09 February 2010 1:44:52 pm

Hi there.
I'm having problems with the workaround for php 5.2.9 included in http://projects.ez.no/ezjscore/subversion/129.

In my dev machine i still have php 5.2.6. The problem is with this piece of code




$persistentVariable[$key] = array_unique( $persistentVariable[$key], SORT_STRING );




As far i know, all this came from this issue
http://issues.ez.no/IssueView.php?Id=15635&activeItem=19&rv[]=1193&rm=1&column=8&sortOrder=4

But with 5.2.6 that code returns an empty array

to do some test i modified my code to something like



if( $key = 'css_files' )


{


print_r( $persistentVariable[$key] );


$persistentVariable[$key] = array_unique( $persistentVariable[$key], SORT_STRING );


print_r( $persistentVariable[$key] );


}




Before the array_unique call i get all the css as expected, but after the call i get nothing. I've got some warnings in my debug. For css i get this




Wrong parameter count for array_unique() in /home/carlos/[...]/extension/ezjscore/autoloads/ezjscpackertemplatefunctions.php on line 355




For js list i get




Warning: PHP: E_WARNING        Feb 09 2010 13:36:24


Wrong parameter count for array_unique() in /home/carlos/[...]/extension/ezjscore/autoloads/ezjscpackertemplatefunctions.php on line 355


Warning: PHP: E_WARNING         Feb 09 2010 13:36:24


array_diff() [<a href='function.array-diff'>function.array-diff</a>]: Argument #1 is not an array in /home/carlos/[...]/extension/ezjscore/autoloads/ezjscpackertemplatefunctions.php on line 376




Am i doing something wrong? If not, don't know if that patch is the best option to solve that issue. It seems that, at least, php 5.2.6 doesn't like you provide that second parameter...

Btw, as this patch have also added to ez publish trunk at rev 24818... maybe can i get some problems because of it?

Thank you.

Twitter: @crevillo
Skype ID: carlostanta
http://www.tantacom.com
eZ Diff Squad member

Up

Carlos Revillo

Member since:
31 January 2007

Posts: 53

Tuesday 09 February 2010 7:58:42 pm

Same goes for fixImagePaths function at ezjscpacker.php file. With my php 5.2.6 version ezjspacker has problems in generating absolute paths to images when packing.
Cheers.

Twitter: @crevillo
Skype ID: carlostanta
http://www.tantacom.com
eZ Diff Squad member

Up

André R

Member since:
20 August 2005

Posts: 171

Wednesday 10 February 2010 10:56:43 am

Thanks for mentioning this, we decided to revert this last week in eZ Publish, but forgot that I had implemented it here as well. So thanks ;)

--
ar

Up

You need to be logged in to post messages in the forums. New users may register here.