Code Monkey home page Code Monkey logo

Comments (13)

dragomano avatar dragomano commented on June 16, 2024 1

Confirm, I didn't notice it, because I didn't log out of the forum after installation :)

Post2: protected static Post|Post2 $obj;
Login: protected static Login2|Login $obj;
Logout: protected static Login2|Logout $obj;

from smf.

jdarwood007 avatar jdarwood007 commented on June 16, 2024

I can't reproduce this error. Is anyone else able to?

from smf.

Oldiesmann avatar Oldiesmann commented on June 16, 2024

I can't reproduce this on my test board either.

from smf.

dragomano avatar dragomano commented on June 16, 2024

For me, this issue occurs only on PHP 8.0.30. There is no problem with PHP 8.1+

from smf.

DiegoAndresCortes avatar DiegoAndresCortes commented on June 16, 2024

I can reproduce on PHP 8.0.30

from smf.

DiegoAndresCortes avatar DiegoAndresCortes commented on June 16, 2024

I get pretty much the same issue in action=login
Type of SMF\Actions\Login::$obj must be SMF\Actions\Login2 (as in class SMF\Actions\Login2) in \Sources\Actions\Login.php on line 28

from smf.

jdarwood007 avatar jdarwood007 commented on June 16, 2024

Odd, I switched over to 8.0.30 and it works still. Must be something more.

from smf.

jdarwood007 avatar jdarwood007 commented on June 16, 2024

Are you guys on Windows? Using a WAMP-type setup? Using Apache with mod_php or something?
Trying to see what variable I am missing to produce this.

from smf.

dragomano avatar dragomano commented on June 16, 2024

Windows 11, PHP 8.0.30

from smf.

DiegoAndresCortes avatar DiegoAndresCortes commented on June 16, 2024

Same here

from smf.

jdarwood007 avatar jdarwood007 commented on June 16, 2024

@ Sesquipedalian I would like your opinion here. Looks like PHP 8.0 on Windows does not handle extending the class concerning self under $obj. PHP 8.0 is already EOL and Windows usage is fairly low I suspect.
We seem to have two options

  1. Fix the code as suggested above, removing reference to self in the base class and using the unions of the base and extended classes.
  2. Do not support PHP 8.0 on Windows.

I'm debating this, because do we want to do a fix for this that affects a very small (maybe non-existent) under of installations?

from smf.

dragomano avatar dragomano commented on June 16, 2024

One more reason to increase the minimum PHP version :)

from smf.

Sesquipedalian avatar Sesquipedalian commented on June 16, 2024

The best solution is to set the type for all $obj properties to the class name (or the name of the extended class, if applicable). I will submit a PR shortly.

from smf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.