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

CMailFile - findHtmlImagesIsSrcData fails - dol_is_dir is not defined #32419

Open
cbeasley-sbb opened this issue Dec 18, 2024 · 1 comment
Open
Labels
Bug This is a bug (something does not work as expected)

Comments

@cbeasley-sbb
Copy link
Contributor

Bug

I have a trigger that create an instance of CMailFile. The trigger is for TICKET_CREATE. This appears to happen when the trigger occurs during an API call to create a ticket.

I was able to get past the bug by adding the following lines in the 'CMailFile::findHtmlImagesIsSrcData' function BEFORE it attempts to call 'dol_is_dir'.

if (! function_exists('dol_is_dir')) {
    require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
}

Dolibarr Version

18.0

Environment PHP

PHP 7.x

Environment Database

10.11.3-MariaDB-1 - Debian 12

Steps to reproduce the behavior and expected behavior

No response

Attached files

No response

@cbeasley-sbb cbeasley-sbb added the Bug This is a bug (something does not work as expected) label Dec 18, 2024
@cbeasley-sbb
Copy link
Contributor Author

It seems odd that the "htdocs/core/lib/functions.lib.php" uses function from "files.lib.php" but does not appear to include/require the library at the top of the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

1 participant