Simplepie and CodeIgniter

yes, found: http://www.haughin.com/code/simplepie/
and tried with php 5.3 installation … simply do not work

I recalled there was a problem in simplepie for assign new by reference, just downloaded newer code from http://simplepie.org/ … still same problem.

So

{syntaxhighlighter brush:bash}
sed ‘s/=&\ new/=\ new/’ simplepie.inc > Simplepie.php
{/syntaxhighlighter}

adding if ( ! defined('BASEPATH')) exit('No direct script access allowed'); to first line, removing ?> from last line, make things work.

Some comment on new by reference are in http://php.net/manual/en/language.references.php

On why and where reference are bad there is a beautiful article: http://schlueters.de/blog/archives/125-Do-not-use-PHP-references.html

and another on “strange” things that could happen: http://schlueters.de/blog/archives/141-References-and-foreach.html


Posted

in

,

by

Tags: