Jump to content

Language warning making it not work? Wrong parameter count for debug_backtrace()


Soma
 Share

Recommended Posts

I got this site on a server from a friend and it has php 5.2.4 latest PW in a subdir. Everything works fine but as soon as I install language module I get this:

Warning: Wrong parameter count for debug_backtrace() in /----/pw/wire/core/LanguageFunctions.php on line 32

What is it about? Also can't get translation to work in templates.

Edit: When I change the line:

$traces = debug_backtrace(defined('DEBUG_BACKTRACE_IGNORE_ARGS') ? DEBUG_BACKTRACE_IGNORE_ARGS : false);

to the following it works again.

$traces = debug_backtrace();
Link to comment
Share on other sites

From PHP documentation: "Before 5.3.6, the only values recognized are TRUE or FALSE, which are the same as setting or not setting the DEBUG_BACKTRACE_PROVIDE_OBJECT option respectively."

Perhaps that could explain the error you were getting?

Edit: actually it seems that before PHP 5.2.5 debug_backtrace() didn't allow ANY parameters. Not exactly sure if that could mean "not even false", but if that's the case this might be the real reason for your problem. I'm sure there's a PHP guru somewhere around here who knows this for sure, though.. Ryan? :)

Edited by teppo
Link to comment
Share on other sites

Can you suppress this error with $config->debug = false; ? If not, we may need to add a version check before calling debug_backtrace.

Yes if I disable debugging it works... which means when I turn it on (always on when developing) the multilanguage doesn't work on frontend and admin. :/ And I love debugging enabled when developing. It also breaks the admin, this particular one appears on all pages even frontend. :)

If adding the check wouldn't harm anyone I would be thankful.

Link to comment
Share on other sites

No problem I don't mind adding this. Though am thinking this is one where it would be more efficient for us to just suppress the error (with a leading @). Just committed. I think this will fix it, but please let me know if you find this doesn't resolve it.

  • Like 1
Link to comment
Share on other sites

  • 3 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...