[SOLVED] Possible bug in router.php - or is it a stylistic issue?

Started by mb000000, August 02, 2013, 18:07:28 PM

Previous topic - Next topic

mb000000

J2.5.14 (at last) and VM2.0.22a

Whilst investigating an entirely different problem in a payments plugin I have written, I noticed that VM's router.php contains on line 466:
if ($segments[0] = 'number')
Perhaps it's just me but I nearly always think this style of code (a conditional test that also does assignment) is hard to read *and*, more often than not, is a simple typoe when the = should have been ==

So, I ask - should this really be ==?

Mark
[Edit - marked as solved]

alatak

Hello
yes you are rigth,
and it should even be this code
$helper->compareKey($segments[0],'number')