From 1bd552ee319a8f8f69c45f03d2ed38424c51e114 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 4 Dec 2015 09:29:58 +0300 Subject: [PATCH] compat patches for php7 --- classes/feeds.php | 2 +- classes/pref/feeds.php | 4 ++-- lib/phpmailer/class.phpmailer.php | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) mode change 100644 => 100755 classes/pref/feeds.php mode change 100644 => 100755 lib/phpmailer/class.phpmailer.php diff --git a/classes/feeds.php b/classes/feeds.php index 07a18741d..7d12275d1 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -935,7 +935,7 @@ class Feeds extends Handler_Protected { //$reply['headlines']['content'] =& $ret[5]['content']; //$reply['headlines']['toolbar'] =& $ret[5]['toolbar']; - $reply['headlines'] =& $ret[5]; + $reply['headlines'] = $ret[5]; if (!$next_unread_feed) $reply['headlines']['id'] = $feed; diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php old mode 100644 new mode 100755 index e839af34e..595d29577 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -297,7 +297,7 @@ class Pref_Feeds extends Handler_Protected { if ($_REQUEST['mode'] != 2) { $fl['items'] = array($root); } else { - $fl['items'] =& $root['items']; + $fl['items'] = $root['items']; } return $fl; @@ -410,7 +410,7 @@ class Pref_Feeds extends Handler_Protected { if (isset($item['items']['_reference'])) { $data_map[$item['id']] = array($item['items']); } else { - $data_map[$item['id']] =& $item['items']; + $data_map[$item['id']] = $item['items']; } } if ($item['id'] == 'root') { diff --git a/lib/phpmailer/class.phpmailer.php b/lib/phpmailer/class.phpmailer.php old mode 100644 new mode 100755 index 99c0d783a..9c286c9a1 --- a/lib/phpmailer/class.phpmailer.php +++ b/lib/phpmailer/class.phpmailer.php @@ -1853,23 +1853,23 @@ class PHPMailer { // return false; // } // } - $magic_quotes = get_magic_quotes_runtime(); + /*$magic_quotes = get_magic_quotes_runtime(); if ($magic_quotes) { if (version_compare(PHP_VERSION, '5.3.0', '<')) { set_magic_quotes_runtime(0); } else { ini_set('magic_quotes_runtime', 0); } - } + }*/ $file_buffer = file_get_contents($path); $file_buffer = $this->EncodeString($file_buffer, $encoding); - if ($magic_quotes) { + /*if ($magic_quotes) { if (version_compare(PHP_VERSION, '5.3.0', '<')) { set_magic_quotes_runtime($magic_quotes); } else { ini_set('magic_quotes_runtime', $magic_quotes); } - } + }*/ return $file_buffer; } catch (Exception $e) { $this->SetError($e->getMessage());