Wedge

Public area => Bug reports => The Pub => Archived fixes => Topic started by: Dismal Shadow on November 6th, 2012, 09:54 AM

Title: Install Errors (Part 2)
Post by: Dismal Shadow on November 6th, 2012, 09:54 AM
I think I got similar error with Alpha 1

Code: [Select]
Strict standards: Only variables should be passed by reference in \Sources\Class-CSS.php on line 966 Call Stack #TimeMemoryFunctionLocation 10.0119517592{main}( )..\install.php:0 20.4887580672installExit( )..\install.php:91 30.4888580888template_install_above( )..\install.php:372 40.56492744840add_css_file( )..\install.php:2014 50.56952754216wedge_cache_css_files( )..\Subs-Cache.php:405 60.74273091200wess_nesting->process( )..\Subs-Cache.php:630
http://localhost/Wedge/css/install/chrome24-1352139630.css">

Prob related to missed extensions needed to be enabled?

Alpha 2 using Wampsever
Title: Re: Install Errors (Part 2)
Post by: Nao on November 6th, 2012, 10:15 AM
That's an odd one...

$m[2] = str_replace('&'reset($this->parse_ancestors($this->rules[$node['parent']])), $m[2]);
I don't see anything in there being passed by reference..?
Maybe the reset() call is expecting its param to be a variable because it'll reset its position? But all I'm asking of reset() is to return the first item in the array, meaning the PHP devs have a bug in there or something...

What PHP version are you using?

A temp fix would be to put the parse_ancestors call result into a var and then doing the reset() on that var, if you don't mind testing...
Posted: November 6th, 2012, 10:10 AM

Okay... Found a reference (if I may say) here:
http://stackoverflow.com/questions/6726219/strict-standards-error

They say that an 'easy' fix is to add brackets around the function call. Totally silly :) But if it works...

Thus, try to replace that line with:

$m[2] = str_replace('&'reset(($this->parse_ancestors($this->rules[$node['parent']]))), $m[2]);
Title: Re: Install Errors (Part 2)
Post by: Dismal Shadow on November 6th, 2012, 10:18 AM
PHP 5.4.3

FIXED in \Sources\Class-CSS.php  :D
Title: Re: Install Errors (Part 2)
Post by: Nao on November 7th, 2012, 12:52 AM
So, that line fixed it...?
Noted for my next commit ;)

Haven't found other occurrences of reset() on a non-variable, so it should be okay to have it just in this one.