Update PicoFeed (avoid some PHP warnings)

This commit is contained in:
Frédéric Guillot 2014-12-26 10:56:50 -05:00
parent 75601d173c
commit c9a3b5117a
4 changed files with 15 additions and 11 deletions

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer' . '/autoload_real.php'; require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInitc9ebccb0a3ac2fed704b9ca3688ea671::getLoader(); return ComposerAutoloaderInitafa19cf4aabbde48e28a8081b9102b7e::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInitc9ebccb0a3ac2fed704b9ca3688ea671 class ComposerAutoloaderInitafa19cf4aabbde48e28a8081b9102b7e
{ {
private static $loader; private static $loader;
@ -19,9 +19,9 @@ class ComposerAutoloaderInitc9ebccb0a3ac2fed704b9ca3688ea671
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInitc9ebccb0a3ac2fed704b9ca3688ea671', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInitafa19cf4aabbde48e28a8081b9102b7e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInitc9ebccb0a3ac2fed704b9ca3688ea671', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitafa19cf4aabbde48e28a8081b9102b7e', 'loadClassLoader'));
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
@ -42,14 +42,14 @@ class ComposerAutoloaderInitc9ebccb0a3ac2fed704b9ca3688ea671
$includeFiles = require __DIR__ . '/autoload_files.php'; $includeFiles = require __DIR__ . '/autoload_files.php';
foreach ($includeFiles as $file) { foreach ($includeFiles as $file) {
composerRequirec9ebccb0a3ac2fed704b9ca3688ea671($file); composerRequireafa19cf4aabbde48e28a8081b9102b7e($file);
} }
return $loader; return $loader;
} }
} }
function composerRequirec9ebccb0a3ac2fed704b9ca3688ea671($file) function composerRequireafa19cf4aabbde48e28a8081b9102b7e($file)
{ {
require $file; require $file;
} }

View File

@ -162,18 +162,18 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fguillot/picoFeed.git", "url": "https://github.com/fguillot/picoFeed.git",
"reference": "9bfc660ff57569ccc89b92de806c918e934d0c93" "reference": "26a0824e3e0b4986f19facc961f21c8a70876b90"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fguillot/picoFeed/zipball/9bfc660ff57569ccc89b92de806c918e934d0c93", "url": "https://api.github.com/repos/fguillot/picoFeed/zipball/26a0824e3e0b4986f19facc961f21c8a70876b90",
"reference": "9bfc660ff57569ccc89b92de806c918e934d0c93", "reference": "26a0824e3e0b4986f19facc961f21c8a70876b90",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
}, },
"time": "2014-12-24 23:02:34", "time": "2014-12-26 15:54:33",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {

View File

@ -118,6 +118,10 @@ class XmlParser
*/ */
public static function getHtmlDocument($input) public static function getHtmlDocument($input)
{ {
if (empty($input)) {
return new DomDocument;
}
if (version_compare(PHP_VERSION, '5.4.0', '>=')) { if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
$callback = function ($in) { $callback = function ($in) {
$dom = new DomDocument; $dom = new DomDocument;
@ -237,7 +241,7 @@ class XmlParser
foreach ($namespaces as $name => $url) { foreach ($namespaces as $name => $url) {
$namespace = $xml->children($namespaces[$name]); $namespace = $xml->children($namespaces[$name]);
if ($namespace->$property->count() > 0) { if (isset($namespace->$property) && $namespace->$property->count() > 0) {
if ($attribute) { if ($attribute) {