View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
19839Bug reportsImport/Exportpublic2024-11-20 10:04
ReporterUlysseus Digital Unit Assigned To 
PrioritynoneSeverityminor 
Status ready for testingResolutionopen 
Product Version6.6.x 
Summary19839: Exporting a survey to PDF will result in PHP error
Description

When trying to export a survey, I get a PHP error

Steps To Reproduce

Steps to reproduce

Limesurvey with recent PHP8.
Create a survey, export it as PDF.

Expected result

PDF download

Actual result

PHP error
end(): Calling end() on an object is deprecated

in /var/www/html/application/librarires/admin/quexmlpdf.php (1992)
if ($ttmp != end($qu->text)) {

TagsNo tags attached.
Attached Files
image.png (98,974 bytes)   
image.png (98,974 bytes)   
image-2.png (115,964 bytes)
Bug heat6
Complete LimeSurvey version number (& build)LimeSurvey Community Edition Version 6.4.3+240122
I will donate to the project if issue is resolvedYes
Browser
Database type & versionmariadb Ver 15.1 Distrib 10.5.8-MariaDB
Server OS (if known)Ubuntu
Webserver software & version (if known)Apache2
PHP Version8.1.27

Users monitoring this issue

There are no users monitoring this issue.

Activities

Ulysseus Digital Unit

Ulysseus Digital Unit

2024-11-19 12:23

reporter   ~81423

sorry it's wrongly categorized as 6.6.x whereas it's 6.4.3+240122

c_schmitz

c_schmitz

2024-11-19 13:29

administrator   ~81424

Please update to the latest version and check if the bug can still be reproduced. Thank you.

adamzammit

adamzammit

2024-11-20 01:39

developer   ~81445

I can reproduce this on the latest version - if debug level is set to 1 or 2.

The issue is that the functions end() and current() are deprecated on objects from PHP 8.1

So this isn't an error as yet, but a warning that is being converted to an error.

I've written a patch that will fix these warnings too - pull request coming.

For now running in non-debug mode (or where you don't print deprecation notices to the screen via config in PHP) will fix this.

adamzammit

adamzammit

2024-11-20 01:49

developer   ~81446

https://github.com/LimeSurvey/LimeSurvey/pull/4044

c_schmitz

c_schmitz

2024-11-20 10:04

administrator   ~81450

Great, thank you!

Issue History

Date Modified Username Field Change
2024-11-19 11:48 Ulysseus Digital Unit New Issue
2024-11-19 11:48 Ulysseus Digital Unit File Added: image.png
2024-11-19 11:48 Ulysseus Digital Unit File Added: image-2.png
2024-11-19 12:23 Ulysseus Digital Unit Note Added: 81423
2024-11-19 12:23 Ulysseus Digital Unit Bug heat 0 => 2
2024-11-19 13:29 c_schmitz Assigned To => adamzammit
2024-11-19 13:29 c_schmitz Status new => assigned
2024-11-19 13:29 c_schmitz Note Added: 81424
2024-11-19 13:29 c_schmitz Bug heat 2 => 4
2024-11-20 01:39 adamzammit Note Added: 81445
2024-11-20 01:39 adamzammit Bug heat 4 => 6
2024-11-20 01:49 adamzammit Note Added: 81446
2024-11-20 10:04 c_schmitz Note Added: 81450
2024-11-20 10:04 c_schmitz Assigned To adamzammit =>
2024-11-20 10:04 c_schmitz Status assigned => ready for testing