Why am I getting this "Only variables should be passed by reference" error with PHP?
<p>I'm getting this error:-</p>

<blockquote>
  <p>Strict standards: Only variables should be passed by reference</p>
</blockquote>

<p>... and I don't have any idea what's going on; the error occurred in this code:</p>

<pre><code>public function prepare_items() {
    $columns = $this-&gt;get_columns();
    $hidden = array();
    $sortable = $this-&gt;get_sortable_columns();
    $this-&gt;_column_headers = array($columns, $hidden, $sortable);
    $this-&gt;items = $this-&gt;flagged_message();

    usort( $this-&gt;flagged_message(), array( &amp;$this, 'usort_reorder' ) );
    $this-&gt;items = $this-&gt;flagged_message();        

}
</code></pre>

<p>This line is the error:</p>

<pre><code> usort( $this-&gt;flagged_message(), array( &amp;$this, 'usort_reorder' ) );
</code></pre>

<p>The <code>flagged_message()</code> function is:</p>

<pre><code>public function flagged_message(){
    global $wpdb;
    $improper_contents = $wpdb-&gt;get_results( $wpdb-&gt;prepare("SELECT comment_id FROM pw_commentmeta WHERE meta_key = 'flag_this_message' AND meta_value = '%d'", $this-&gt;flagged_id) );
    $flagged = [];
    if($improper_contents){
        foreach ($improper_contents as $improper_content_arr) {

        $comment_id = (int)$improper_content_arr-&gt;comment_id;
        $comment = get_comment( $comment_id );
        $comment_content = $comment-&gt;comment_content;
        $comment_author = $comment-&gt;comment_author;
        $comment_post_ID = $comment-&gt;comment_post_ID;
        $comment_date = $comment-&gt;comment_date;
        $comment_who = $comment-&gt;user_id;

        $flagged[] = array(
            "ID"                =&gt;  $comment_id,
            "username"          =&gt;  $comment_author,
            "flagged_message"   =&gt;  $comment_content,
            "date"              =&gt;  $comment_date,
        );

        }

    }
    return $flagged;
}
</code></pre>

<p>I don't understand why the error is being raised, can someone please explain it to me?</p>