下面的代碼導致錯誤:Notice: Uninitialized string offset: 0
:爲什麼「get_option」返回一個空字符串而不是我的默認數組?
$defArray = array("width" => "", "height" => "");
$option = get_option("myoption", $defArray);
//This throws the error
echo $option[ "width" ];
//This shows it as type "string"
var_dump($option);
根據該文件,我應該可以通過,如果沒有保存在該選項被返回默認值(和沒有什麼,我只是做了它)。 http://codex.wordpress.org/Function_Reference/get_option
爲什麼它不使用默認值?