我正在使用 Drupal 8,但由于这对我来说似乎是一个 PHP 问题,所以我在这里而不是在 Drupal Answers 上问它。
isset
以下代码中的语句应该 return ,TRUE
但它没有:
/*
$specifier = 'field_google_hire_identifier'
$field_storage_definitions = array of objects
*/
var_dump(
isset($field_storage_definitions[$specifier]),
$specifier,
$field_storage_definitions[$specifier],
$field_storage_definitions
);
die;
原始输出 HTML:https ://codepen.io/anon/pen/ZwRJdR
数组键:
var_dump( array_keys($field_storage_definitions));
我有点不知道为什么isset($field_storage_definitions[$specifier]
是FALSE
和$field_storage_definitions[$specifier]
是NULL
我卸载了 APC 并禁用了 Opcache。