【发布时间】:2014-06-20 04:41:54
【问题描述】:
我写了一些程序来检查数组中的值。
var_dump($profileuser);//NULL
$profileuser = get_user_to_edit($user_id);//fetch the value of $profileuser
var_dump($profileuser);//does not print the value of $profileuser->user_url
//nor by print_r($profileuser)
if(isset($profileuser->user_url))
echo $profileuser->user_url;//printed!!!!How is it possible??
谁能解释这是怎么发生的?
背景:
我修改了wordpress的内核。
这发生在我修改 wp-admin/user-edit.php 的文件时。
【问题讨论】:
-
听起来不太合理,你确定名字没有错别字吗?
-
在
var_dump($profileuser);之后添加对exit;的呼叫并告诉我们您看到了什么。 -
@FelipeAlmeida 我已经完成了你要我做的事情。字太多,我不能全部打印出来。但是,里面没有 $profileuser->user_url 。只显示 $profileuser->data-user_url 的值;但此值与 $profileuser->user_url 不同。
-
@Hanky웃Panky 请原谅我不知道拼写错误是什么意思。能具体解释一下吗?
-
@Ray typo on Wikipedia。错别字是几个印刷错误(拼写错误)。