Bug 168561 - Function Str("") of empty string get "0"
Summary: Function Str("") of empty string get "0"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
25.2.6.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.2.0 target:25.8.3 target:25...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-26 14:10 UTC by edil
Modified: 2025-09-30 07:33 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description edil 2025-09-26 14:10:06 UTC
Description:
Very easy:
	Dim sTest$
	sTest = Str("") ' -> ""   OK     LO 7.6 and before
	sTest = Str("") ' -> "0"  ERROR  LO 25.2.6 and more

This is a BIG BUG

Steps to Reproduce:
1.sTest = Str("") ' -> "0"  ERROR  LO 25.2.6 and more
2.
3.

Actual Results:
"0"

Expected Results:
""


Reproducible: Always


User Profile Reset: No

Additional Info:
It is a heavy bug, for checking empty string this can crash applications.
I have find this bug in a lot of pc.
Comment 1 Commit Notification 2025-09-26 18:10:38 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/92878d3216aeaf0e5131c0c3fa1f8dc9ce67b5b4

tdf#168561: fix Str function implementation

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2025-09-26 18:12:41 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/e7aef120d0822836b789a1803fad4553aadc8718

tdf#168561: fix Str documentation
Comment 3 Mike Kaganski 2025-09-26 22:06:34 UTC
FTR: regression after 33434f16206aaa07f56af8f4c23b05b3c88a2124
Comment 4 Commit Notification 2025-09-29 08:25:46 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/f846899e0b6fc2ec9ab2b4a4f65d06549e3f0763

tdf#168561: fix Str function implementation

It will be available in 25.8.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2025-09-29 14:56:32 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8-2":

https://git.libreoffice.org/core/commit/2787a155bfdb750a20820ffeee366b2e468e6c57

tdf#168561: fix Str function implementation

It will be available in 25.8.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2025-09-30 07:33:40 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/ec8227e2225f56a4d9517cc9d69d593db7302d90

tdf#168561: fix Str function implementation

It will be available in 25.2.7.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.