Uploaded image for project: 'Lucee Development'
  1. LDEV-458

Parsing issue with CFC property containing attribute with no value

    Details

    • Type: Incompatibility
    • Status: Deployed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.5.2.010
    • Fix Version/s: 4.5.3.002
    • Labels:
      None

      Description

      Forum Reference:https://groups.google.com/forum/?fromgroups=&hl=en#!topic/railo/FQTR3BwXvVs

      This behavior affects the information returned by getMetaData() on a CFC.
      In ACF, I can use the following line in a script-based CFC and the value of the "name" attribute is "myService" and the value of the "inject" attribute is "". (Excepted behavior)

      property name='myService' inject;
      

      In Lucee, the metadata shows a key called "name" with the value "inject" and there is no key called "inject". The string "myService" doesn't make it into the metadata at all. To get it to work, I have to use the following syntax:

      property name='myService' inject='myService';
      

      In this case, it's not an issue of "inject" getting a default value, but instead the parser getting confused and trying to use the name of the "inject" attribute as the value of the "name" key.
      The code samples are properties used by the WireBox DI/ioc framework which parses CFC metadata to perform mixin injection.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                michaeloffner Michael Offner
                Reporter:
                bdw429s Brad Wood
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: