Beispiel #1
0
 private function maybe_fire_array_access_deprecation_notice($offset)
 {
     if (self::SUPPRESS_DEPRECATION_NOTICE) {
         return;
     }
     if (!self::$deprecation_notice_fired) {
         _deprecated_function('Array access to the field object is now deprecated. Further notices will be suppressed. Offset: ' . $offset, '1.9', 'the object operator e.g. $field->' . $offset);
         self::$deprecation_notice_fired = true;
     }
 }
Beispiel #2
0
 /**
  * Fires the deprecation notice only once per page. Not fired during AJAX requests.
  *
  * @param string $offset The array key being accessed.
  */
 private function maybe_fire_array_access_deprecation_notice($offset)
 {
     if (self::SUPPRESS_DEPRECATION_NOTICE) {
         return;
     }
     if (defined('DOING_AJAX') && DOING_AJAX) {
         return;
     }
     if (!self::$deprecation_notice_fired) {
         _deprecated_function("Array access to the field object is now deprecated. Further notices will be suppressed. \$field['" . $offset . "']", '2.0', 'the object operator e.g. $field->' . $offset);
         self::$deprecation_notice_fired = true;
     }
 }