peterjaap / magerun-addons

Addon modules for n98-magerun
187 stars 41 forks source link

dev:template-vars with `false` arg values ignored #34

Closed wkw closed 8 years ago

wkw commented 8 years ago

Thanks for the great addons. just found them!

Report refers to this version 9dc5af0

First time I ran dev:template-vars I supplied false values for the options

n98-magerun.phar dev:template-vars --addblocks=false --addvariables=false

but it added the blocks and vars anyway.

Deleted a couple of them and started testing variations to confirm. In order to NOT auto-add the blocks/vars, I have to leave off the options args completely.

I think this line: if ($this->_input->getOption('addblocks')) { and the corresponding one for addvariables is simply reporting if a value was supplied for the argument, and not distinguishing between the value being true/false.

If I weren't in SUPEE-6788 hell at the moment I'd work up a patch to submit. apologies.

peterjaap commented 8 years ago

This is fixed in one of the latest PR's.