? Pending

User tests: Successful: Unsuccessful:

avatar brianteeman
brianteeman
26 Jan 2020

all the changes here are to fix code where the intent was to do a comparison butby using a single = the code actually does a variable assignment

Testing by code review I assume @wilsonge ?

This problem exists in many places but I guess it is easier to code review if they are discreet pull requests

avatar brianteeman brianteeman - open - 26 Jan 2020
avatar brianteeman brianteeman - change - 26 Jan 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Jan 2020
Category Administration com_templates
avatar SharkyKZ
SharkyKZ - comment - 26 Jan 2020

This code is correct. It assigns a value to a variable and evaluates it as boolean.

if ($a = foo()) {} is equivalent to:

$a = foo();

if ($a) {}
avatar wilsonge
wilsonge - comment - 26 Jan 2020

What @SharkyKZ says. Now I'm home and I can look we are actually setting the variables here as well. All of these that are changed here are correct as they are.

avatar wilsonge wilsonge - change - 26 Jan 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-01-26 17:13:47
Closed_By wilsonge
Labels Added: ?
avatar wilsonge wilsonge - close - 26 Jan 2020
avatar brianteeman
brianteeman - comment - 26 Jan 2020

I wasn't sure which is why I asked. No problems

Add a Comment

Login with GitHub to post a comment