Arbit - project tracking

Dwoo

#79: Failure to access array nodes with a dash symbol in their keys

Issue revisions

  • new by torin at 2010-S-21 11:09
  • closed by Jordi Boggiano at 2010-O-17 15:50
Type bug bug
State closed closed
Priority normal normal
Resolution duplicate duplicate
Assigned to Nobody
Scheduled for 1.2.0
Affected versions 1.1.1
Affected components
Last change Sunday 17 October 2010 15:50:29 UTC by Jordi Boggiano

Short description

Unable to access array node, if that node key has a dash '-' symbol in it and the key itself is coming from variable (e.g. not statically typed).

Steps to reproduce

Setting a test array: $this->view->assign('foobarTest', array('asd-123'=>'foobar'));

Then in view trying to access it: {$keyTest='asd-123'} {dump $foobarTest['asd-123']} {dump $foobarTest[$keyTest]}

Expected behavior

Expected to see: foobar foobar

Actual behavior

foobar null

  • Jordi Boggiano at Sunday 17 October 2010 15:50:29 UTC

    Works in svn trunk or git master's branch, as far as I can tell.