Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

cprats

A question I shouldn't ask here

Recommended Posts

First of all let me apologize for asking this question here, as I am totally conscious it is not the appropriated place to ask it.

I have a module built for Prestashop running well under TB, to auction items. I purchased it in Modulesmarket through Prestashop's marketplace. Not a single complaint about the developer. He last updated this module in 2015, and I asked him if he would make it compatible with Prestashop 1.7. The answer was no, and this is why I didn't doubt to switch to TB. After reading some topics in this forum I've understood why the developer didn't want to waste his time updating anything for PS1.7. This is the module, for if it happens anyone has curiosity about it: https://addons.prestashop.com/en/build-auction-site/3438-auctions.html

I did a debugging and I got this warning:

Warning: Declaration of ProductAuctionObjectModel::__get($key) should be compatible with & ObjectModelCore::__get($property) in /home/xxxx/public_html/modules/auctions/classes/model/object_model/productauctionobjectmodel.php on line 156 Could anyone give me a slight Idea of what does this mean? Obviously I am not asking anyone a solution for a module no one here built, I just would like to understand what the problem is before contacting the developer.

Share this post


Link to post
Share on other sites

Php is just complaining that overloading function does not have same signature as overloaded function in parent class. To fix this, simply edit file modules/auctions/classes/model/object_model/productauctionobjectmodel.php, and on line 156 change signature of function __get from something like this

public function __get($key)

to

public function &__get($key)

Note the extra &

Share this post


Link to post
Share on other sites

Sure!

But

public function_get($key)

was in line 59 instead of line 156

I've changed it to &_get($key) and the warning has disappeared when debugging.

Thanks for this!

Share this post


Link to post
Share on other sites

The override system in thirtybees / prestashop would really need some attention. It's very brittle, yet there are many things that can be done to mitigate these kind of errors and warnings

Share this post


Link to post
Share on other sites

@datakick I agree wholeheartedly. 75% of the problems I had with my shop had to do with overrides or conflicts with overrides. Whenever something goes wrong now, it is usually the first thing I check. It is also what generates the most errors. I like the flexibility it provides but it lacks stability.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×