Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Leantime\Domain\Projects\Services\Projects::getProject(): Argument #1 ($id) must be of type int, string given #2392

Closed
1 of 2 tasks
rimi-itk opened this issue Mar 11, 2024 · 2 comments

Comments

@rimi-itk
Copy link
Contributor

If you have problems with the installation please use our community forum

What set up are you using

  • Cloud Hosted Version
  • Self Hosted

Describe the bug
A recent change added type-hints on function parameters and this leads to some runtime errors.

To Reproduce
Steps to reproduce the behavior:

  1. Make sure that your session has no current project set (i.e. $_SESSION[] is empty).
  2. Try to sign in
  3. The error
    Illuminate\View\ViewException:
    Leantime\Domain\Projects\Services\Projects::getProject(): Argument #1 ($id) must be of type int, string given, called in /app/app/Domain/Menu/Services/Menu.php on line 125 (View: /app/app/Domain/Menu/Templates/headMenu.blade.php) (View: /app/app/Domain/Menu/Templates/headMenu.blade.php) (View: /app/app/Domain/Menu/Templates/headMenu.blade.php)
    
    is reported.

Expected behavior
I expect to be able to sign in without having a current project.

Leantime Version
https://github.com/Leantime/leantime/releases/tag/v3.0.7

This was referenced Mar 11, 2024
@compumatter
Copy link
Contributor

Same here. Just upgraded my development version and got a 500 error
image

Specific error in logs:
[14-Mar-2024 14:02:53 America/Los_Angeles] TypeError: Leantime\Domain\Projects\Services\Projects::getProject(): Argument #1 ($id) must be of type int, string given, called in public_html/app/Domain/Menu/Services/Menu.php on line 125 and defined in public_html/app/Domain/Projects/Services/Projects.php:101

@marcelfolaron
Copy link
Contributor

Fixed in 3.1.0-beta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants