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

PHP Fatal error: Uncaught TypeError: geItemReadablePath in New Item #4484

Open
JoseRovani opened this issue Nov 23, 2024 · 1 comment
Open

Comments

@JoseRovani
Copy link

JoseRovani commented Nov 23, 2024

Steps to reproduce

  1. New Item
  2. Label = test
  3. Login = mylogin
  4. Password = tgFKVxSs56#ah4jkHVm
  5. Save

Expected behaviour

Add item and return folders screen

Actual behaviour

Does not return to the folder screen and does not close the "Reading folder" message, remaining on the inclusion screen but including the item.

Tell us what happens instead
You have to click "cancel" to return to the folder screen

Server configuration

Operating system:Ubuntu 22.04.5 LTS

Web server:

**Database:**MySQL version 8.0.40-0ubuntu0.22.04.1

**PHP version:8.1.2-1ubuntu2.19

Teampass version: 3.1.1.26

Teampass configuration file:

Updated from an older Teampass or fresh install:
PLEASE attach to this issue the file /includes/config/tp.config.php.

Client configuration

Browser: Opera One(versão: 114.0.5282.185)

**Operating system:**Windows 11 Pro 23H2

Logs

Web server error log

Argument #2 ($label) must be of type string, null given, called in /var/www/teampass/sources/items.queries.php on line 753 and defined in /var/www/teampass/sources/main.functions.php:1762\n
Stack trace:\n#0 /var/www/teampass/sources/items.queries.php(753): geItemReadablePath()\n
#1 {main}\n  thrown in /var/www/teampass/sources/main.functions.php on line 1762, referer: http://192.168.0.105/index.php?page=items
Insert your webserver log here

Log from the web-browser developer console (CTRL + SHIFT + i)

Insert the log here and especially the answer of the query that failed.


@JoseRovani
Copy link
Author

JoseRovani commented Nov 23, 2024

I found the solution:

in items.queries.php look for
// Get path
$path = geItemReadablePath(
(int) $inputData['folderId'],
$label,
$SETTINGS

change by

// Get path
$path = geItemReadablePath(
(int) $inputData['folderId'],
(string) $label,
$SETTINGS

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

1 participant