Jump to content

panormitis

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by panormitis

  1. 2 hours ago, steven99 said:

    That would be the case in other versions of PHP if ini_set is in the disabled_functions list, correct?  (though disabling that function would break a ton of other scripts like Wordpress)  Good defensive coding doesn't hurt though. 

    On PHP 8.0/8.1 disabled functions are treated as nonexistent so a fatal error occurs.

    On earlier PHP versions, disabled functions raise just a warning and the script continues to work.

    I believe this should be addressed in Blesta, some functions could be disabled so they should be checked with function_exists() first.

  2. Technically I guess it's not really a bug, but since a disabled function in PHP 8.1 becomes pretty much non existent, it raises a fatal error and prevents Blesta from working.

    So I commented out line 78 of the file ...vendors/minphp/session/src/Session.php and added another bellow it.

    //              ini_set('session.' . $key, $value);
                    if (function_exists('ini_set')) { ini_set('session.' . $key, $value); }
    

  3. I found a temporary workaround, initially I was trying a try-catch like this:

    	//            $output = call_user_func_array('sprintf', $args);
                  try { $output = call_user_func_array('sprintf', $args); }
                  catch(ArgumentCountError $e) { }
    	

    However it didn't work. But this did:

    	//            $output = call_user_func_array('sprintf', $args);
                  try { $output = sprintf($args[0], $args[1], $args[2]); }
                  catch(ArgumentCountError $e) { }
    	

     

    EDIT: Ok the following works too, just needed a backslash ?

    	//            $output = call_user_func_array('sprintf', $args);
                  try { $output = call_user_func_array('sprintf', $args); }
                  catch(\ArgumentCountError $e) { }
    	
  4. On older php versions this would have generated just a warning, but now throws a fatal error.

    Uncaught Exception ArgumentCountError: "3 arguments are required, 2 given" at ...vendors/minphp/language/src/Language.php line 125 {"exception":"[object] (ArgumentCountError(code: 0): 3 arguments are required, 2 given at ...vendors/minphp/language/src/Language.php:125)"} 

     

    I tried a try-catch to suppress it but didn't help. Any ideas?

  5. Hi Tiny,

    I performed some tests.

    On some departments of support manager, I have unchecked the "Allow only clients to open or reply to tickets", because I want also non-clients (without an account in Blesta) to create tickets via sending an e-mail.

    The issue only occurs on non-clients, not for everybody. If someone without an account in Blesta, visits a ticket via {update_ticket_url} he/she can't close it.

    A 401 jquery error is generated when clicking the Close button and the ticket remains open.

    However, clients with an account (they are required to log in to access the tickets) are not affected.

    Looks like a session issue.

    I have edited my first post for clarification. I didn't know it only affects users without an account.

  6. Hi Tiny & Paul,

    I upgraded from Blesta 4.2 and I'm positive I overwritten all files. Actually I restored a backup and tried the upgrade twice (in case something went wrong the first time) and this issue is reproducible.

    I don't know if it matters, I'm using PHP 7.2.8 and on Blesta 4.2 I was using support manager pro. Now on Blesta 4.3 I have uninstalled support manager pro and using the regular support manager.

  7. I have upgraded to Blesta 4.3.0

    I'm using support manager.  On some departments I have unchecked the "Allow only clients to open or reply to tickets", because I want also non-clients (without an account in Blesta) to create tickets via sending an e-mail.

    If someone without an account in Blesta, visits a ticket via {update_ticket_url} he/she can't close it.

    A 401 jquery error is generated when clicking the Close button and the ticket remains open.

    If it's a client with an account, everything works normally.

    Looks like a session issue

    Please see the attached pictures

    blesta2.jpg

    blesta1.jpg

×
×
  • Create New...