Can't make SimplePie Laravel bundle to work - php

I'm trying to use SimplePie for Laravel to parse RSS feeds. I have followed the instructions and all, but can't seem to make it work.
This is my View. I echoed the rss
<?php $result = rssparser::parse();
echo $result;?>
And this error appears:
Non-static method SimplePie_Misc::fix_protocol() should not be called
statically, assuming $this from incompatible context
C:\wamp\www\ctnpepo\bundles\rssparser\libraries\simplepie\SimplePie.php
on line 834
Is there any way to fix this?

This is only a warning internally in SimplePie, and you can safely ignore it.

Related

Error in PyroCMS: Non-static method Lex_Parser::inject_noparse() should not be called statically

I have inherited a CMS system called PyroCMS and it is showing an error. I am not familiar with this CMS so any suggestions would be welcome.
"A PHP Error was encountered
Severity: 8192
Message: Non-static method Lex_Parser::inject_noparse() should not be called statically, assuming $this from incompatible context
Filename: libraries/Template.php
Line Number: 285"
Here is the relevant piece of code from the Template file.
// Now that *all* parsing is sure to be done we inject the {{ noparse }} contents back into the output
if (class_exists('Lex_Parser')) {
$this->_body = Lex_Parser::inject_noparse($this->_body);
}
// Want it returned or output to browser?
if (!$return) {
$this->_ci->output->set_output($this->_body);
}
return $this->_body;
}
I have searched extensively for any clue as to what might be causing this but all I can come up with is dozens of other sites with the same issue
Thank you for taking the time to help.

How to correct and change a static method to a non-static method for Joomla module

I updated a client's Joomla from J2.5.28 to J3.6.4. I have corrected most of the errors but this one stumps me even after researching here. I'm a novice PHP programmer and know enough to fix a few things here and there. I researched this throughout the internet and on StackOverflow and simply do not understand how to fix the following error in my particular case. I understand I could just turn off error reporting; However I do not want to do that because [from what I did find] this doesn't actually solve the problem. Solving the problem and correcting the code is what is actually recommended.
Here is the error:
Strict Standards: Non-static method modBtContentShowcaseHelper::fetchHead() should not be called statically in ...modules/mod_bt_contentshowcase/mod_bt_contentshowcase.php on line 64
Line 64 reads as follows:
modBtContentShowcaseHelper::fetchHead( $params );
I would like to know how to correct this.
Note: Upgrading this extension is not an option because it was customized by the developer of the extension and an upgrade would wipe everything out. Contacting them usually takes several days to get a response and I need to get this corrected
Thanks in advance for the help!
You need to initiate the class modBtContentShowcaseHelper
$x = new modBtContentShowcaseHelper();
$x->fetchhead($params);

Configuring third party service in my CompilerPass

I'm using Symfony 2.7 and I want to configure some service by adding configurator to it. I follow instructions on http://symfony.com/doc/current/components/dependency_injection/configurators.html, but I want to add my configurator to that service in my CompilerPass.
I wrote the following code:
$container->getDefinition('exercise_html_purifier.config.default')
->setConfigurator([
$container->getDefinition('application.exercise_html_purifier.config_configurator')->getClass(),
'configure'
]);
where application.exercise_html_purifier.config_configurator is id of my configurator service. This code works as expected, but of course it is also triggers php's warning:
DEPRECATED - Non-static method Application\Service\ExerciseHTMLPurifier\Configurator\ConfigConfigurator::configure() should not be called statically, assuming $this from incompatible context
because the configure method is not static in my case. I can't figure out, how to tell symfony to set non-static configurator callback.
I tried to set it like this:
$container->getDefinition('exercise_html_purifier.config.default')
->setConfigurator([
$container->get('application.exercise_html_purifier.config_configurator'),
'configure'
]);
but got this error:
ContextErrorException in XmlDumper.php line 201:
Warning: DOMElement::setAttribute() expects parameter 2 to be string, object given
I even tried to use the following syntax:
$container->getDefinition('exercise_html_purifier.config.default')
->setConfigurator([
'#application.exercise_html_purifier.config_configurator',
'configure'
]);
but also got error
FatalErrorException in appDevDebugProjectContainer.php line 2992:
Parse Error: syntax error, unexpected '#', expecting identifier (T_STRING)
What I'm doing wrong?
Thanks.
OK, I've read the source of \Symfony\Component\DependencyInjection\Dumper\XmlDumper::addService() and found that one of the solutions is to pass Definition instead of instance:
$container->getDefinition('exercise_html_purifier.config.default')
->setConfigurator([
$container->getDefinition('application.exercise_html_purifier.config_configurator'),
'configure'
]);

Joomla Registration MySQL Error

Anytime someone goes to register (We use RSForms for this) we get this error
Warning
Registration failed: SQL=INSERT INTO (,,,,,,,,,,,,,,) VALUES (105,0,0,0,0,0,0,1,0,0,1,0,1,1,0)
Then I turned error reporting to developer and got these when I tried to sign up.
Notice: Use of undefined constant DS - assumed 'DS' in /home/content/03/7103303/html/plugins/system/jcktypography/jcktypography.php on line 15
Notice: Use of undefined constant DS - assumed 'DS' in /home/content/03/7103303/html/plugins/system/jcktypography/jcktypography.php on line 15
Strict Standards: Non-static method JApplicationSite::getMenu() should not be called statically, assuming $this from incompatible context in /home/content/03/7103303/html/templates/hot_designnow/index.php on line 40
Strict Standards: Non-static method JApplicationCms::getMenu() should not be called statically, assuming $this from incompatible context in /home/content/03/7103303/html/libraries/cms/application/site.php on line 250
Strict Standards: Only variables should be assigned by reference in /home/content/03/7103303/html/templates/hot_designnow/index.php on line 40
Also when turning on debug system and language I get these in red(We are using the default register now)
**Parsing errors in language files**
JROOT/administrator/language/en-GB/en-GB.com_rsform.ini : error(s) in line(s) 546
also when looking at Extention Manager -> Manage there is a new plugin/module
Code:
COM_INSTALLER_TYPE_
I hope this helps, Thank you for taking the time to try to help
From what I can see you have 3 different problems here:
Your first error message
Warning
Registration failed: SQL=INSERT INTO (,,,,,,,,,,,,,,) VALUES (105,0,0,0,0,0,0,1,0,0,1,0,1,1,0)
Indicates that you are using a custom sql script in rsforms, which is somehow broken. Maybe you have upgraded from 1.5 and this custom sql (and possibly related php) needs to be rewritten?
Your second problem:
The "Notice lines indicate you have a plugin, which is not full Joomla 3.0 compatible, I would deinstall and get an upgraded version if possible.
The "Strict standards" lines are probably Joomla code not up to sratch with strict standards, but also your template has not been upgraded to adhere to these
Your third problem:
"Parsing errors indicated that either a language file of RSForm is missing or has not been properly upgraded. I would reinstall/upgrade RsForm.
In regards to the main angle of your question, you need to look at the custom RSForm SQL script and post that here.

Third-party library not loading in Expression Engine 2.0

I'm developing a properties module for Expression Engine that's to take properties from Rightmove's BLM format and populate a database, and then those properties be searchable from the front-end.
I've found a CodeIgniter library (http://biostall.com/codeigniter-rightmove-blm-parser-library) that does the heavy lifting of the BLM files. However, I can't seem to load it.
My code in mcp.properties.php looks like this:
$config = array();
$this->EE->load->library('rightmove_v3_parser');
$this->rightmove_v3_parser->initialize($config);
$data['properties'] = $this->rightmove_v3_parser->process();
print '<pre>'; print_r($data['properties']); print '</pre>';
exit;
The library files are in a libraries sub-folder in my properties add-on folder under /system/expressionengine/third_party/.
However, when using the above code, I get the following error in Expression Engine:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Properties_mcp::$Rightmove_v3_parser
Filename: properties/mcp.properties.php
Line Number: 44
Fatal error: Call to a member function initialize() on a non-object in /Users/Martin/Sites/expressionengine/system/expressionengine/third_party/properties/mcp.properties.php on line 4
Where am I going wrong? Why can't I bundle this library with my add-on and call it within my add-on?
You've missed the EE object when referencing the library. So after loading the library you should use
$this->EE->rightmove_v3_parser
to access it, rather than
$this->rightmove_v3_parser
Have you included the library at the top of your plugin, i could be wrong but I don't think loading a library like that will work from a library subdir in your third_party plugin folder. Try including the library at the top of your plugin.

Categories