<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Observations from Uppsala &#187; php</title>
	<atom:link href="http://jakob.engbloms.se/archives/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://jakob.engbloms.se</link>
	<description>Computer Technology: Simulation, Virtualization, Virtual Platforms, Embedded, Multicore and Multiprocessing (by Jakob Engblom)</description>
	<lastBuildDate>Sun, 29 Jan 2012 19:45:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
    <title>Observations from Uppsala</title>
    <url>http://jakob.engbloms.se/favicon.png</url>
    <link>http://jakob.engbloms.se</link>
    <width>32</width>
    <height>32</height>
    <description>Observations from Uppsala - http://jakob.engbloms.se</description>
    </image>		<item>
		<title>WordPress 2.7 Almost Broke this Site</title>
		<link>http://jakob.engbloms.se/archives/455?&#038;owa_medium=feed&#038;owa_sid=</link>
		<comments>http://jakob.engbloms.se/archives/455#comments</comments>
		<pubDate>Sun, 14 Dec 2008 14:23:16 +0000</pubDate>
		<dc:creator>Jakob</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[blog theme]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress 2.7]]></category>

		<guid isPermaLink="false">http://jakob.engbloms.se/?p=455</guid>
		<description><![CDATA[My hosting service just told me to update to WordPress 2.7 &#8212; as the previous version had known security holes. So I did, and after I upgraded, the blog itself broke. Just after the first post on the front page, there was a nasty error message: Fatal error: Only variables can be passed by reference [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-496" style="margin: 10px;" title="flower" src="http://jakob.engbloms.se/wp-content/uploads/2009/01/flower.png" alt="flower" width="32" height="32" />My hosting service just told me to update to WordPress 2.7 &#8212; as the previous version had known security holes. So I did, and after I upgraded, the blog itself broke.</p>
<p>Just after the first post on the front page, there was a nasty error message:</p>
<pre><strong>Fatal error:</strong> Only variables can be passed by reference in <strong>.../functions.php</strong> on line <strong>...</strong></pre>
<p><span id="more-455"></span></p>
<p>Fortunately, some googling gave me the answer. There is a one-line computation apparently pretty common in WordPress theme code that has to be broken out across two lines, suddenly.</p>
<p>From</p>
<pre>    function comment_count($count) {
        global $id;
        $comments_by_type = &amp;separate_comments(get_comments('post_id=' . $id));
        return count($comments_by_type['comment']);
    }</pre>
<p>To</p>
<pre>    function comment_count($count) {
        global $id;
        $get_comments= get_comments('post_id=' . $id);
        $comments_by_type = &amp;separate_comments($get_comments);
        return count($comments_by_type['comment']);
    }</pre>
<p>I have no idea about php etc, but this does seem to work. Thanks to <a href="http://wordpress.org/support/topic/224053">wordpress support</a>.</p>
<div class="simple_likebuttons_container_small">
      <div class="simple_likebuttons_googleplus">
        <g:plusone size="medium" count="false" href="http://jakob.engbloms.se/archives/455"></g:plusone>
      </div>
    
      <div class="simple_likebuttons_twitter simple_likebuttons_twitter_s">
        <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-url="http://jakob.engbloms.se/archives/455" data-lang="en">Tweet</a>
      </div>
    
      <div class="simple_likebuttons_facebook">
        <div id="fb-root"></div>
        <script>(function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) {return;}
          js = d.createElement(s); js.id = id;
          js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, "script", "facebook-jssdk"));</script>
        <div class="fb-like" data-href="http://jakob.engbloms.se/archives/455" data-send="false" data-layout="button_count" data-show-faces="false" data-width="90"></div>
      </div>
    </div>]]></content:encoded>
			<wfw:commentRss>http://jakob.engbloms.se/archives/455/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

