Adding new menu entries fails
-
I activated debug mode and tried to add an individual link to my top menu which resulted in:
[10-May-2019 10:17:15 UTC] PHP Warning: Invalid argument supplied for foreach() in /mnt/web318/b1/45/58782945/htdocs/WordPress_SecureMode_01/wp-includes/wp-db.php on line 2363
(nothing is added to the menu)The content of wp-db.php at line 2363
foreach ( $data as $field => $value ) {
conetxt:
/** * Prepares arrays of value/format pairs as passed to wpdb CRUD methods. * * @since 4.2.0 * * @param array $data Array of fields to values. * @param mixed $format Formats to be mapped to the values in $data. * @return array Array, keyed by field names with values being an array * of 'value' and 'format' keys. */ protected function process_field_formats( $data, $format ) { $formats = $original_formats = (array) $format; foreach ( $data as $field => $value ) { $value = array( 'value' => $value, 'format' => '%s', ); if ( ! empty( $format ) ) { $value['format'] = array_shift( $formats ); if ( ! $value['format'] ) { $value['format'] = reset( $original_formats ); } } elseif ( isset( $this->field_types[ $field ] ) ) { $value['format'] = $this->field_types[ $field ]; } $data[ $field ] = $value; } return $data; }
Health summary:
https://pastebin.com/JWptWjkkThe page I need help with: [log in to see the link]
- The topic ‘Adding new menu entries fails’ is closed to new replies.