Concrete 5.8 issue - "print the custom "select" Attribute options"

Permalink
$attrKey = FileAttributeKey::getByHandle('subject');
$cont = $attrKey->getController();
$attrOptions = $cont->getOptions();  // line 55 throw error
foreach($attrOptions as $option){
   // do whatever you want with the attribute option
}

This code wont for me in Concrete5.8 (the same block in 5.7 works fine).
line 55: Call to a member function getOptions() on a non-object


100% i create this "custom" select attrubute (other codes works).

Someone know about some issue with this methods?

I hope in the future the core will add helper for this issue (A lot of times you need to print a list for the "select" attribute)

Old thread about this:
https://www.concrete5.org/community/forums/usage/how-to-print-the-al...

siton
 
mesuva replied on at Permalink Reply
mesuva
The attributes system has been reworked a fair bit in v8, so there are a few backwards compatibility issues.

I know that Andrew and co are taking it very seriously and there's a goal to shift towards addressing these kinds of problems before a release.

If you haven't already, this is suitable for raising on github as an issue.
It may simply be something that will be patched in the near future so the 5.7 code will work as expected.