Doctrine 1
  1. Doctrine 1
  2. DC-469

getAccessors and getMutators shows notices if they are not set

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.2
    • Component/s: Record
    • Labels:
      None

      Description

      It's a very minor problem I know that. However when I try to use getAccessors() or getMutators() functions, if nothing is set on the table definitions, it throws some notices on the php (on error_reporting all) that such an index does not exists. As there is no such index to be found it returns null instead of expected array (empty if there is no mutators for that table)

      public function getAccessors()
      {
      $componentName = $this->_table->getComponentName();
      if (!isset(self::$_customAccessors[$componentName]))

      { return array(); }

      return self::$_customAccessors[$componentName];
      }

      such a code solves the problem and not notices is thrown and empty array is returned if there is no accessors. Same kind of an improvement is required for getMutators too

      I know that this is a minor issue however I wanted to inform you.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            roy simkes
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: