Soma Posted June 10, 2012 Share Posted June 10, 2012 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 More sharing options...
teppo Posted June 10, 2012 Share Posted June 10, 2012 (edited) 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 June 10, 2012 by teppo Link to comment Share on other sites More sharing options...
ryan Posted June 11, 2012 Share Posted June 11, 2012 Can you suppress this error with $config->debug = false; ? If not, we may need to add a version check before calling debug_backtrace. Link to comment Share on other sites More sharing options...
Soma Posted June 11, 2012 Author Share Posted June 11, 2012 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 More sharing options...
ryan Posted June 12, 2012 Share Posted June 12, 2012 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. 1 Link to comment Share on other sites More sharing options...
Soma Posted September 26, 2012 Author Share Posted September 26, 2012 In newer PW version this stopped working at all, even if debug modus false. Edit: Though not sure what the reason really is. It seems more related to text domain it doesn't find. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now