Skip to content

Undefined property: stdClass::$EASYURL_SHOW_QRCODE on shortener object-info table #115

Description

@nicolas-eoxia

A PHP warning is emitted when the shortener object-info table is rendered on a linked element (proposal/order/invoice/contract):

Warning: Undefined property: stdClass::$EASYURL_SHOW_QRCODE in htdocs/custom/easyurl/class/shortener.class.php on line 525

Cause

EASYURL_SHOW_QRCODE is a per-user setting ($user->conf, stored in llx_user_param). It is read directly ($user->conf->EASYURL_SHOW_QRCODE) at lines 525 and 544 without a guard, so for any user who has never toggled the QR-code switch the property does not exist on $user->conf and PHP raises an undefined-property warning.

Fix

Read the optional user param through !empty() (like isset(), it does not warn on missing properties) at both call sites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions