From 0b85169e107ccf2a0980f1468820960df9d80823 Mon Sep 17 00:00:00 2001
From: fabrixxm <fabrix.xm@gmail.com>
Date: Fri, 1 Dec 2017 09:35:05 +0100
Subject: [PATCH 1/3] Missing 'use' in scripts/dbstructure

---
 scripts/dbstructure.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/dbstructure.php b/scripts/dbstructure.php
index cf14c929f6..b23b481261 100644
--- a/scripts/dbstructure.php
+++ b/scripts/dbstructure.php
@@ -7,6 +7,7 @@
 require_once 'include/dbstructure.php';
 
 use Friendica\App;
+use Friendica\Core\Config;
 
 $a = new App(dirname(__DIR__));
 

From 58ac3532b74017802e4027400a3fe6b4eb76efe2 Mon Sep 17 00:00:00 2001
From: Hypolite Petovan <mrpetovan@gmail.com>
Date: Fri, 1 Dec 2017 08:32:21 -0500
Subject: [PATCH 2/3] Fix undefined variables messages

---
 mod/network.php     | 15 +++++++++------
 src/Core/Config.php |  2 +-
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/mod/network.php b/mod/network.php
index 64863b080d..e74df1633a 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -42,6 +42,7 @@ function network_init(App $a) {
 
 	$group_id = (($a->argc > 1 && is_numeric($a->argv[1])) ? intval($a->argv[1]) : 0);
 
+	$cid = 0;
 	if (x($_GET, 'cid') && intval($_GET['cid']) != 0) {
 		$cid = $_GET['cid'];
 		$_GET['nets'] = 'all';
@@ -883,17 +884,19 @@ function networkThreadedView(App $a, $update = 0) {
  * @param App $a The global App
  * @return string Html of the networktab
  */
-function network_tabs(App $a) {
+function network_tabs(App $a)
+{
 	// item filter tabs
 	/// @TODO fix this logic, reduce duplication
 	/// $a->page['content'] .= '<div class="tabs-wrapper">';
-
 	list($no_active, $all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active) = network_query_get_sel_tab($a);
-	// if no tabs are selected, defaults to comments
-	if ($no_active=='active') $all_active='active';
 
-	$cmd = (($datequery) ? '' : $a->cmd);
-	$len_naked_cmd = strlen(str_replace('/new','',$cmd));
+	// if no tabs are selected, defaults to comments
+	if ($no_active == 'active') {
+		$all_active = 'active';
+	}
+
+	$cmd = $a->cmd;
 
 	// tabs
 	$tabs = array(
diff --git a/src/Core/Config.php b/src/Core/Config.php
index a1ea5ae1ff..d3daece159 100644
--- a/src/Core/Config.php
+++ b/src/Core/Config.php
@@ -159,7 +159,7 @@ class Config
 		// manage array value
 		$dbvalue = (is_array($value) ? serialize($value) : $dbvalue);
 
-		dba::update('config', array('v' => $dbvalue), array('cat' => $family, 'k' => $key), true);
+		$ret = dba::update('config', array('v' => $dbvalue), array('cat' => $family, 'k' => $key), true);
 
 		if ($ret) {
 			self::$in_db[$family][$key] = true;

From 508ce4a5bec6862294474628bb18498e65af8e1e Mon Sep 17 00:00:00 2001
From: Adam Magness <adam.magness@gmail.com>
Date: Fri, 1 Dec 2017 18:47:52 -0500
Subject: [PATCH 3/3] Use Exception

use exception
---
 src/Object/Photo.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/Object/Photo.php b/src/Object/Photo.php
index 372f7312a1..a8bb3b4ada 100644
--- a/src/Object/Photo.php
+++ b/src/Object/Photo.php
@@ -11,6 +11,7 @@ use Friendica\Core\Config;
 use Friendica\Core\System;
 use Friendica\Database\DBM;
 use dba;
+use Exception;
 use Imagick;
 use ImagickPixel;