Warning: implode() [function.implode]: Invalid arguments passed in ... on line 50
<pre><code>class  plgSystemUnpublishfront extends JPlugin
{
    /**
     * Constructor
     *
     * For php4 compatability we must not use the __constructor as a constructor for plugins
     * because func_get_args ( void ) returns a copy of all passed arguments NOT references.
     * This causes problems with cross-referencing necessary for the observer design pattern.
     *
     * @param   object      $subject The object to observe
      * @param  array       $config  An array that holds the plugin configuration
     * @since   1.0
     */
    function plgSystemUnpublishfront(&amp; $subject, $config)
    {
        parent::__construct($subject, $config);
    }

    /**
     * Fixes the $my global if the user was restored by the remember me plugin
     */
    function onAfterInitialise()
    {
        $days       = $this-&gt;params-&gt;get('days');
        $startpoint = $this-&gt;params-&gt;get('startpoint');
        $excludes   = $this-&gt;params-&gt;get('excludes',0);

        $db = &amp; JFactory::getDBO();

        $query = "SELECT id FROM #__content AS"
        ."\n WHERE DATE_ADD($startpoint, INTERVAL $days DAY) &lt; NOW() AND id NOT IN($excludes)";
        $db-&gt;setQuery($query);
        $rows = $db-&gt;loadResultArray();

        $daystring = implode(',' , $rows);

        $query = "DELETE FROM #__content_frontpage WHERE content_id IN($daystring)";
        $db-&gt;setQuery($query);
        $db-&gt;Query();
    }
}
**line 50 is "$daystring = implode(',' , $rows);"**
</code></pre>

<p>so where is the mistake?</p>
