Just a quick fix to implement to avoid this strict warning:

Line 261, change this:

$mode = reset(array_keys($modes));

by this:

$modes_keys = array_keys($modes);
$mode = reset($modes_keys);

Just apply the patch & voilà ;)

Comments

gurvan’s picture

Issue summary: View changes
StatusFileSize
new481 bytes
gurvan’s picture

Just a little update to avoid a bug with asset view mode selection

gurvan’s picture

StatusFileSize
new491 bytes

My bad...

Another little fix, I guess now it can be commited in dev

gurvan’s picture

Issue summary: View changes
sinn’s picture

Status: Active » Reviewed & tested by the community

Patch #3 works good.

IRuslan’s picture

Hi,

thanks for catch this.
But from my point of view, as we need to get first key of the $modes array here, it's more suitable to use:

reset($modes);
$mode = key($modes);

Because we don't need to allocate a separate array for keys.

IRuslan’s picture

Status: Reviewed & tested by the community » Fixed

Committed to dev.

  • IRuslan committed 28c39ef on
    Issue #2300259 by gurvan, sinn, IRuslan: Strict warning: Only variables...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.