Git Product home page Git Product logo

Comments (6)

Chluz avatar Chluz commented on June 11, 2024 1

Hi Thomas, thank you for the answer. Yes it's possible, I would even say it's probable. I had not yet pulled this year's changes when the bug was triggered initially. I then implemented the fix above, and starting cherry picking commits - not noticing that the commit you linked might be fixing the issue.
I think that you found the root cause, and we can close this issue now. Thanks Again !

from ssh-key-authority.

wastez avatar wastez commented on June 11, 2024

Thats really strange, i`m using also php7.4 without issues.

from ssh-key-authority.

Chluz avatar Chluz commented on June 11, 2024

Indeed, perhaps I have settings in php which do not allow for these types of error, or my specific install triggers $args[0] == null.

from ssh-key-authority.

thomas-pike avatar thomas-pike commented on June 11, 2024

It would be because the path_join function is being called with a null parameter, which it does not expect. It would be interesting to have the full stacktrace to try to figure out why it is being passed a null value in the first place.

from ssh-key-authority.

Chluz avatar Chluz commented on June 11, 2024

I reverted the change to retrigger the error, and now I'm not getting any error messages. I do not know what is happening.

The original issue was

[Fri Nov 05 23:25:25.974060 2021] [php:error] [pid 16362] [client 192.168.67.13:39040] PHP Fatal error:  Uncaught ErrorException: Trying to access array offset on value of type null in /var/www/ssh-key-authority/core.php:101\nStack trace:\n#0 /var/www/ssh-key-authority/core.php(101): exception_error_handler()\n#1 /var/www/ssh-key-authority/core.php(55): path_join()\n#2 /var/www/ssh-key-authority/core.php(75): autoload_model()\n#3 /var/www/ssh-key-authority/core.php(42): setup_database()\n#4 /var/www/ssh-key-authority/requesthandler.php(19): require('...')\n#5 /var/www/ssh-key-authority/public_html/init.php(18): require('...')\n#6 {main}\n  thrown in /var/www/ssh-key-authority/core.php on line 101

from ssh-key-authority.

thomas-pike avatar thomas-pike commented on June 11, 2024

Making that a bit more readable:

[Fri Nov 05 23:25:25.974060 2021] [php:error] [pid 16362] [client 192.168.67.13:39040] PHP Fatal error:  Uncaught
ErrorException: Trying to access array offset on value of type null in /var/www/ssh-key-authority/core.php:101
Stack trace:
#0 /var/www/ssh-key-authority/core.php(101): exception_error_handler()
#1 /var/www/ssh-key-authority/core.php(55): path_join()
#2 /var/www/ssh-key-authority/core.php(75): autoload_model()
#3 /var/www/ssh-key-authority/core.php(42): setup_database()
#4 /var/www/ssh-key-authority/requesthandler.php(19): require('...')
#5 /var/www/ssh-key-authority/public_html/init.php(18): require('...')
#6 {main}
  thrown in /var/www/ssh-key-authority/core.php on line 101

Given the path this has followed, I can only assume that the error was caused by $base_path somehow being null. Commit be22ecf did fix a bug that would cause $base_path to not be set correctly in CLI scripts. Is it possible that you were running an older version of the code that did not have this fix?

from ssh-key-authority.

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.