Uploaded image for project: 'Ibexa IBX'
  1. Ibexa IBX
  2. IBX-6586

Wrong return type of the method in the Ibexa core

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • None
    • Yes

    Description

      Method getTranslatedField in the class Ibexa\Core\Helper\TranslationHelper should return Field|null according to description, but the method sometimes returns void. You should add "return null" in the end or throw and exception.

      Another method getTranslatedFieldValue from the class Ibexa\Core\MVC\Symfony\Templating\Twig\Extension\ContentExtension triggers the method that I mentioned above, but it doesn't check the outcome and than call method "value". It getTranslatedField can also return null, you can't call method value on null. Please add validation. This is only one of the cases that I found. The same issue is with methid 
      isFieldEmpty

      Designs

        Attachments

          Activity

            People

              Unassigned Unassigned
              d357c6c3-36e5-4840-808a-312424678693@accounts.ibexa.co Dmytro Dzyuba
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: