Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20987

Notice preventing the completion of creating a FieldType draft with null fieldSettings

    XMLWordPrintable

Details

    Description

      In eZ/Publish/Core/FieldType/FieldType.php:

      public function applyDefaultSettings( &$fieldSettings )
      {
          foreach ( $this->getSettingsSchema() as $settingName => $settingConfiguration )
          {
              // Checking that a default entry exists in the settingsSchema but that no value has been provided
              if ( !array_key_exists( $settingName, $fieldSettings ) && array_key_exists( "default", $settingConfiguration ) )
              {
                  $fieldSettings[$settingName] = $settingConfiguration["default"];
              }
          }
      }
      

      $fieldSettings might be a null value which might cause the following notice:

      Warning: array_key_exists() expects parameter 2 to be array, null given in eZ/Publish/Core/FieldType/FieldType.php line 186
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            patrick.allaert-obsolete@ez.no Patrick Allaert (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h