xperseguers / t3ext-ig_ldap_sso_auth

TYPO3 Extension ig_ldap_sso_auth. This extension provides LDAP and SSO support for TYPO3.

Home Page:https://extensions.typo3.org/extension/ig_ldap_sso_auth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP Warning: Undefined array key "uid" in backend regarding IconFactory.php when using PHP 8

axelp94 opened this issue · comments

Hi,

In the TYPO3 backend list module I get the following message when i will add a new record.

PHP Warning: Undefined array key "uid" in /srv/www/htdocs/dev/t5dusdev.itk.local/web/typo3conf/ext/ig_ldap_sso_auth/Classes/Hooks/IconFactory.php line 46

Line of code:
46: $row = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $row['uid']);

Regards,
Axel Peltzer

Please debug that line in your install. I tried with TYPO3 v11 and $row['uid'] is always properly defined in my case. I suspect you may have some extension/record in that folder that behaves oddily.

Please try to figure out "when" $row is missing the uid key (or when it's null or whatever).

Thanks.

error occurs when you create a new record in an empty folder for example
the items in the list of possible tables don't have an uid

Sorry but I tried to create arbitrary records (sys_category, tt_content, ...) in an empty folder, in TYPO3 v11 with PHP 8.1 and I just don't see the bug.

Sorry, but get the same Error. The Error comes only with Configuration Preset: Debug. If it ist set to Live the error is not shown. But I think it exists. Perhaps the Condition can extended:
if (!array_key_exists('tx_igldapssoauth_dn', $row) && $row['uid'] > 0)

I'd say #165 should solve this issue, could you please test on your side?

Sidenote: I was naturally testing in Debug mode, and not in Production.

yes, #165 solves the issue

thanks. thus closed while merging #165