Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feeds
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
feeds
Commits
ed6cfa80
Commit
ed6cfa80
authored
11 years ago
by
Chris Leppanen
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1485870 by brad.bulger, twistor: Remove custom error reporting for SimplePie.
parent
b0108a65
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
feeds.module
+3
-15
3 additions, 15 deletions
feeds.module
plugins/FeedsSimplePieParser.inc
+1
-6
1 addition, 6 deletions
plugins/FeedsSimplePieParser.inc
with
4 additions
and
21 deletions
feeds.module
+
3
−
15
View file @
ed6cfa80
...
@@ -966,15 +966,9 @@ function feeds_plugin($plugin, $id) {
...
@@ -966,15 +966,9 @@ function feeds_plugin($plugin, $id) {
*/
*/
function
feeds_include_library
(
$file
,
$library
)
{
function
feeds_include_library
(
$file
,
$library
)
{
static
$included
=
array
();
static
$included
=
array
();
static
$ignore_deprecated
=
array
(
'simplepie'
);
if
(
!
isset
(
$included
[
$file
]))
{
if
(
!
isset
(
$included
[
$file
]))
{
// Disable deprecated warning for libraries known for throwing them
$included
[
$file
]
=
FALSE
;
if
(
in_array
(
$library
,
$ignore_deprecated
))
{
$level
=
error_reporting
();
// We can safely use E_DEPRECATED since Drupal 7 requires PHP 5.3+
error_reporting
(
$level
^
E_DEPRECATED
^
E_STRICT
);
}
$library_dir
=
variable_get
(
'feeds_library_dir'
,
FALSE
);
$library_dir
=
variable_get
(
'feeds_library_dir'
,
FALSE
);
$feeds_library_path
=
DRUPAL_ROOT
.
'/'
.
drupal_get_path
(
'module'
,
'feeds'
)
.
"/libraries/
$file
"
;
$feeds_library_path
=
DRUPAL_ROOT
.
'/'
.
drupal_get_path
(
'module'
,
'feeds'
)
.
"/libraries/
$file
"
;
...
@@ -995,15 +989,9 @@ function feeds_include_library($file, $library) {
...
@@ -995,15 +989,9 @@ function feeds_include_library($file, $library) {
require
$feeds_library_path
;
require
$feeds_library_path
;
$included
[
$file
]
=
TRUE
;
$included
[
$file
]
=
TRUE
;
}
}
// Restore error reporting level
if
(
isset
(
$level
))
{
error_reporting
(
$level
);
}
}
if
(
isset
(
$included
[
$file
]))
{
return
TRUE
;
}
}
return
FALSE
;
return
$included
[
$file
];
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
plugins/FeedsSimplePieParser.inc
+
1
−
6
View file @
ed6cfa80
...
@@ -67,10 +67,6 @@ class FeedsSimplePieParser extends FeedsParser {
...
@@ -67,10 +67,6 @@ class FeedsSimplePieParser extends FeedsParser {
public
function
parse
(
FeedsSource
$source
,
FeedsFetcherResult
$fetcher_result
)
{
public
function
parse
(
FeedsSource
$source
,
FeedsFetcherResult
$fetcher_result
)
{
feeds_include_simplepie
();
feeds_include_simplepie
();
// Please be quiet SimplePie.
$level
=
error_reporting
();
error_reporting
(
$level
^
E_DEPRECATED
^
E_STRICT
);
// Initialize SimplePie.
// Initialize SimplePie.
$parser
=
new
SimplePie
();
$parser
=
new
SimplePie
();
$parser
->
set_raw_data
(
$fetcher_result
->
getRaw
());
$parser
->
set_raw_data
(
$fetcher_result
->
getRaw
());
...
@@ -149,8 +145,7 @@ class FeedsSimplePieParser extends FeedsParser {
...
@@ -149,8 +145,7 @@ class FeedsSimplePieParser extends FeedsParser {
}
}
// Release parser.
// Release parser.
unset
(
$parser
);
unset
(
$parser
);
// Set error reporting back to its previous value.
error_reporting
(
$level
);
return
$result
;
return
$result
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment