Hi,

I am trying to upgraded a simple site of mine from v3 to v4, I also swapped out the leafo/lessphp library for the oyejorge/less.php as per the installation instructions, and changed it to use this library on the settings page.

When I hit the frontend, I now get this error:

Fatal error: Can't inherit abstract function LessEngineInterface::compile() (previously declared abstract in LessEngine) in \sites\all\modules\contrib\less\engines\abstract.LessEngine.inc on line 6

Any thoughts or anything I am missing?

Thanks.

Comments

threeg’s picture

Issue summary: View changes
corey.aufang’s picture

What version of PHP are you using?

threeg’s picture

It's version 5.3.5.

corey.aufang’s picture

Category: Support request » Feature request

Ok, so this appears to be a bug in earlier versions of PHP 5.3.

It appears fixed in PHP 5.3.9: http://3v4l.org/NP9Be

Officially, you need to update your version of PHP to at least the latest version of 5.3.

I'm going to consider making a change to the module to work with this.

Please, I strongly suggest that you upgrade your version of PHP.

threeg’s picture

Ok thanks. I'll try that.

jaydee1818’s picture

I'm also having the same issue, and yes there seems to be a thread about the bug here:

https://bugs.php.net/bug.php?id=66818

After speaking to our server admin, it seems that the PHP that comes with the latest version CentOS (which we are using) is only currently at 5.3.3 and there is a reluctance by them to upgrade outside of the CentOS distro. In the perfect world, I'd like to upgrade to the latest version of PHP but not so easy.

  • corey.aufang committed 8554f11 on 7.x-4.x
    Issue #2419565 by corey.aufang: Can't inherit abstract function...
corey.aufang’s picture

CentOS 7 comes with PHP 5.4.16.

That said, you should see a new dev for 7.x-4.x that should have this patched.

corey.aufang’s picture

Status: Active » Needs review
jaydee1818’s picture

Yep, but we're on 5.3 not 5.4, cheers

jaydee1818’s picture

Might be worth altering the subheading on the module home page that reads:

7.x-4.0 Features (PHP 5.3+ required)

to

7.x-4.0 Features (PHP 5.3.9+ required)

tahauygun’s picture

http://cgit.drupalcode.org/less/commit/?id=8554f11-----> if you dont want to update your current php. I had the same problem and it worked for me.