Cynosure.X International LLC


Add Comment | Related Links | TrackBack
Related Content

magpierss 0.72 obsoleted with split

magpierss is a really handy PHP RSS parser. The latest version is 0.72 and it hasn't been updated in a while. Even worse, the 'split' PHP function, used in '', "has been DEPRECATED as of PHP 5.3.0."

Good news is that it's rather easy to fix by yourself. You just have to replace 'split' with 'preg_split' and slight modification to its arguments. The following is the original line of code:

  list($ns, $el) = split( ':', $element, 2);

The replacement code is as follows:

  list($ns, $el) = preg_split( '/:/', $element, 2);

The two different lines of code should work exactly the same. With this simple line change, magpierss 0.72 should work with the new version of PHP without any warnings nor failure.

Chieh Cheng
Sun, 18 Jul 2010 08:40:44 +0000

Thank you so much for this post!

Thu, 15 Nov 2012 21:31:04 +0300

Thank you for this, I recently updated php only to find magpie on the fritz and this fix worked great!

Mon, 28 Apr 2014 02:18:15 +0400

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 7 + 1?
Click button only once, please!


TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Products | Services
Forums | Latest | RSS
Library | Search | Wiki
Help | Licenses

Login | Register

60 Users Online

Hacking Digital Cameras
Fun for Photographers

Amazon Associate

Copyright © 1996 - 2024. All Rights Reserved.