Skip to content
Browse files

php: 5.6 Support

This addresses an issue with v1.14 where `??` (null coalescing operator) in
class Export throws a fatal error when using PHP 5.6. This is an issue
especially for people who cannot upgrade PHP but want to take advantage of
the latest osTicket codebase/features. This updates the null coalescing
operator to an isset ternary operator to keep backwards compatibility with
PHP 5.6.
  • Loading branch information...
JediKev committed Nov 13, 2019
1 parent 24f3a0b commit 5e7497d9a45565d0d0a6c980734b8e0508d83a84
Showing with 2 additions and 2 deletions.
  1. +2 −2 include/class.export.php
@@ -928,8 +928,8 @@ function addTask($task, $zip, $prefix, $notes=true, $psize=null) {
function download($options = array()) {
global $thisstaff;
$notes = @$options['notes'] ?? false;
$tasks = @$options['tasks'] ?? false;
$notes = isset(@$options['notes']) ? @$options['notes'] : false;
$tasks = isset(@$options['tasks']) ? @$options['tasks'] : false;
// TODO: Use a streaming ZIP library
$zipfile = tempnam(sys_get_temp_dir(), 'zip');

0 comments on commit 5e7497d

Please sign in to comment.
You can’t perform that action at this time.