I have been getting this error since I updated my woocommerce plugin:
Fatal error: Call to undefined function array_replace_recursive()
The errror is on line 586:
enter image description here
I have found some solutions in this quote here:
Fatal error: Call to undefined function array_replace_recursive() for CI Controller solution
But the problem is that i really do not know what to change in my code or where, in order fot the error to stop popping up. Any help would be greatly appreciated.
Check your PHP version. array_replace_recursive only available in PHP >= 5.3.
Reference:
array_replace_recursive
since I updated my WooCommerce plugin
I suggest you check once by deactivating all plugins except WooCommerce and by activating default WordPress theme. It may be possible that any of your plugin is not compatible with the latest WooCommerce plugin.
Let me know if that doesn't work...
Related
I have a two PHP Notices at one of my project - "Trying to get property of non-object"
I know whats that means (more or less), but the problem is i can't find which code element make this notice... this drive me crazy...
Trying to get property of non-object in /xxxxxxxxxxxx/wp-includes/class-wp-query.php on line 3871
( At github is here -> https://github.com/WordPress/WordPress/blob/master/wp-includes/class-wp-query.php#L4029 )
Trying to get property of non-object in /xxxxxxxxxxxxxx/wp-includes/link-template.php on line 643
( At github is here -> https://github.com/WordPress/WordPress/blob/master/wp-includes/link-template.php#L673 )
In this project i used:
My own template
Woocommerce plugin (latest release)
ACF (latest release)
Yoast SEO (latest release)
Maybe is something wrong with my custom query?
For example this is what i use:
' https://pastebin.com/YEBQAXgs '
The question is: how can i find/catch this notice and figure which part of my code should i correct?
It comes from Woocommerce wc_prevent_adjacent_posts_rel_link_wp_head function which is actioned by the template_redirect hook.
It does a call to is_singular('product') which gets the queried object and if the query is for a feed it comes back NULL and therefore is not an object.
With what you posted, it’s probably a Symptom of an invalid sql query. If you try to prepare bad sql, it won’t generate a statement object which will lead to that error.
I'm using prestashop 1.7.2.0 to write an admin module that adds nested categories and products from a csv file. I understood that addJQuery() is deprecated and I'm trying to get jquery code to work. I get Uncaught ReferenceError: $ is not defined.
I have created a displayBackOfficeHeader hook with the following:
public function hookDisplayBackOfficeHeader(){
$this->context->controller->addJS($this->_path.'/js/jqShim.min.js');
$this->context->controller->addCSS($this->_path.'/css/getcontent.css');
$this->context->controller->addJS($this->_path.'/js/getcontent.js');
}
as you can see I have tried including jqShim.min.js and I still got the same error. what am I missing?
Thanks
You can include $this->context->controller->addJquery(); in first line of your hookDisplayBackOfficeHeader() function.
I have a linux server and when updating posts I receive this error when in debug mode, Any help is greatly appreciated thanks.
Catchable fatal error: Object of class WP_Term could not be converted to string in /public_html/wp-includes/taxonomy.php on line 2285
You're trying to use an object as a string. I think there's a filter or action running in the save_post action.
Do you have some custom code using get_terms ?
The function has change it's parameter order since WordPress 4.5. See more details here
If you have any plugin or code using this function, try to change, update or desactivate them.
I'm trying to register a Zend\Feed\Reader\Reader extension for working with Media RSS.
I followed the documentation, however I couldn't even get the extension to register.
This is the error I get:
Fatal error: Call to undefined method Zend\Feed\Reader\StandaloneExtensionManager::setInvokableClass() in ...
This is how I call the function:
if (!Reader::isRegistered('MrssService')) {
$extensions = \Zend\Feed\Reader\Reader::getExtensionManager();
$extensions->setInvokableClass('MrssService', 'Service\MrssService');
Reader::registerExtension('MrssService');
}
It seems that setInvokableClass() doesn't even exist for the object returned by Reader::getExtensionManager().
Any idea how to fix this?
If you are using zend-feed >= v2.6, there is another way to create custom extensions.
$extensions = new \Zend\Feed\Reader\ExtensionPluginManager();
$extensions->setInvokableClass('MrssService', 'Service\MrssService');
Reader::setExtensionManager(new \Zend\Feed\Reader\ExtensionManager($extensions));
Reader::registerExtension('MrssService');
BUT actually (v2.7) there is a little problem, that I reported here: https://github.com/zendframework/zend-feed/issues/29
When it will be solved, I will remove this notice on this post.
Meanwhile, if you want to use it, you can just fork and make the edit that I suggested in that Issue.
PHP Fatal error: Call to undefined function thebuggenie\core\helpers\make_url() in ../core/helpers/TextParser.php on line 706
This is the error that I keep getting when trying to set up the VCS-integration successfully in The Bug Genie. It is an issue tracker that has VCS (git) integration. The commits can be linked to a project, and with the correct commit-message to the right issue using a git-hook. Then you can view the commit in the issue tracker. Apparently the commit is getting linked to the project, but it doesn't get linked to the issue because of the error. Can anybody help me?
The source code on GitHub.
Thanks in advance!
I've found the solution. There appears to be an error in the vcs-integration. Apparently the ui.inc.php-library is not loaded when using the git-hook.
So the temporary solution (until they solve it) is:
At modules/vcs_integration/Vcs_integration.php:226, add:
framework\Context::loadLibrary('ui');
As far as i see, make_url function is defined in a global namespace, but is called from namespace thebuggenie\core\helpers. So i suppose that's your problem