【发布时间】:2013-03-21 18:33:19
【问题描述】:
这是我的 wordpress 主题的一部分,它给了我最后一行代码的错误。 我在 PHP 5.4 上运行 wordpress 3.5.1
Fatal error: Cannot assign by reference to overloaded object in C:\server\htdocs\web\digitalnak\wp-content\themes\rework\framework\php\PeTheme\PeThemeGallery.php on line 234
这是代码
$post =& get_post($id);
if (!$post ) return $post;
$null = null;
if ($post->post_type != "gallery") return $null;
$meta =& $this->master->meta->get($id,$post->post_type);
$post->meta =& $meta;
【问题讨论】:
-
哪些是第 234 行?你运行的是什么版本的PHP?你运行的主题是什么?什么版本的 Wordpress?
-
234 是 $post->meta =& $meta ,我有 php 版本 5.4 和 wordpress 3.5.1
-
$post是什么对象?
标签: php wordpress object overloading