jdarwood007

jdarwood007 commited on 2020-01-04 11:30:59
Showing 3 changed files, with 21 additions and 19 deletions.

... ...
@@ -646,7 +646,7 @@ class SFSL
646 646
 
647 647
 		$entries = array();
648 648
 		while ($row = $smcFunc['db_fetch_assoc']($result))
649
-			$entries[$row['id_sfs']] => $this->getSFSLogPrepareEntry($row);			
649
+			$entries[$row['id_sfs']] = $this->getSFSLogPrepareEntry($row);			
650 650
 		$smcFunc['db_free_result']($result);
651 651
 
652 652
 		return $entries;
... ...
@@ -179,7 +179,7 @@ class SFS
179 179
 
180 180
 		foreach ($verificationMap as $key => $extendedChecks)
181 181
 			if ($thisVerification['id'] == $key && in_array($key, $options))
182
-				return call_user_func($this, 'checkVerificationTest' . ucfirst($key));
182
+				return call_user_func(array($this, 'checkVerificationTest' . ucfirst($key)));
183 183
 
184 184
 		// Others areas.  We have to play a guessing game here.
185 185
 		return $this->checkVerificationTestExtra($thisVerification);
... ...
@@ -809,12 +809,14 @@ class SFS
809 809
 		$optionsKeyExtra = $user_info['is_guest'] ? 'sfs_verification_options_extra' : 'sfs_verOptionsMemExtra';
810 810
 
811 811
 		// Standard options.
812
-		$options = array();
813 812
 		if ($this->versionCheck('2.0', 'smf') && !empty($modSettings[$optionsKey]))
814 813
 			$options = safe_unserialize($modSettings[$optionsKey]);
815 814
 		elseif (!empty($modSettings[$optionsKey]))
816 815
 			$options = $this->decodeJSON($modSettings[$optionsKey]);
817 816
 
817
+		if (empty($options))
818
+			$options = array();
819
+
818 820
 		// Extras.
819 821
 		if (!empty($modSettings[$optionsKeyExtra]))
820 822
 		{
... ...
@@ -58,14 +58,14 @@ $smcFunc['db_create_table']($table['table_name'], $table['columns'], $table['ind
58 58
 function db_field($name, $type, $size = 0, $unsigned = true, $auto = false)
59 59
 {
60 60
 	$fields = array(
61
-		'varchar' => db_field_varchar($size, $unsigned, $auto),
62
-		'text' => db_field_text($size, $unsigned, $auto),
63
-		'mediumtext' => db_field_mediumtext($size, $unsigned, $auto),
64
-		'tinyint' => db_field_tinyint($size, $unsigned, $auto),
65
-		'smallint' => db_field_smallint($size, $unsigned, $auto),
66
-		'mediumint' => db_field_mediumint($size, $unsigned, $auto),
67
-		'int' => db_field_int($size, $unsigned, $auto),
68
-		'bigint' => db_field_bigint($size, $unsigned, $auto),
61
+		'varchar' => db_field_varchar($size),
62
+		'text' => db_field_text(),
63
+		'mediumtext' => db_field_mediumtext(),
64
+		'tinyint' => db_field_tinyint($unsigned, $auto),
65
+		'smallint' => db_field_smallint($unsigned, $auto),
66
+		'mediumint' => db_field_mediumint($unsigned, $auto),
67
+		'int' => db_field_int($unsigned, $auto),
68
+		'bigint' => db_field_bigint($unsigned, $auto),
69 69
 	);
70 70
 
71 71
 	$field = $fields[$type];
... ...
@@ -80,7 +80,7 @@ function db_field($name, $type, $size = 0, $unsigned = true, $auto = false)
80 80
  * @version 1.2
81 81
  * @since 1.2
82 82
 */
83
-function db_field_varchar($size = 0, $unsigned = true, $auto = false)
83
+function db_field_varchar($size = 0)
84 84
 {
85 85
 	return array(
86 86
 		'auto' => false,
... ...
@@ -96,7 +96,7 @@ function db_field_varchar($size = 0, $unsigned = true, $auto = false)
96 96
  * @version 1.2
97 97
  * @since 1.2
98 98
 */
99
-function db_field_text($size = 0, $unsigned = true, $auto = false)
99
+function db_field_text()
100 100
 {
101 101
 	return array(
102 102
 		'auto' => false,
... ...
@@ -111,7 +111,7 @@ function db_field_text($size = 0, $unsigned = true, $auto = false)
111 111
  * @version 1.2
112 112
  * @since 1.2
113 113
 */
114
-function db_field_mediumtext($size = 0, $unsigned = true, $auto = false)
114
+function db_field_mediumtext()
115 115
 {
116 116
 	return array(
117 117
 		'auto' => false,
... ...
@@ -126,7 +126,7 @@ function db_field_mediumtext($size = 0, $unsigned = true, $auto = false)
126 126
  * @version 1.2
127 127
  * @since 1.2
128 128
 */
129
-function db_field_tinyint($size = 0, $unsigned = true, $auto = false)
129
+function db_field_tinyint($unsigned = true, $auto = false)
130 130
 {
131 131
 	return array(
132 132
 		'auto' => $auto,
... ...
@@ -144,7 +144,7 @@ function db_field_tinyint($size = 0, $unsigned = true, $auto = false)
144 144
  * @version 1.2
145 145
  * @since 1.2
146 146
 */
147
-function db_field_smallint($size = 0, $unsigned = true, $auto = false)
147
+function db_field_smallint($unsigned = true, $auto = false)
148 148
 {
149 149
 	return array(
150 150
 		'auto' => $auto,
... ...
@@ -162,7 +162,7 @@ function db_field_smallint($size = 0, $unsigned = true, $auto = false)
162 162
  * @version 1.2
163 163
  * @since 1.2
164 164
 */
165
-function db_field_mediumint($size = 0, $unsigned = true, $auto = false)
165
+function db_field_mediumint($unsigned = true, $auto = false)
166 166
 {
167 167
 	return array(
168 168
 		'auto' => $auto,
... ...
@@ -180,7 +180,7 @@ function db_field_mediumint($size = 0, $unsigned = true, $auto = false)
180 180
  * @version 1.2
181 181
  * @since 1.2
182 182
 */
183
-function db_field_int($size = 0, $unsigned = true, $auto = false)
183
+function db_field_int($unsigned = true, $auto = false)
184 184
 {
185 185
 	return array(
186 186
 		'auto' => $auto,
... ...
@@ -198,7 +198,7 @@ function db_field_int($size = 0, $unsigned = true, $auto = false)
198 198
  * @version 1.2
199 199
  * @since 1.2
200 200
 */
201
-function db_field_bigint($size = 0, $unsigned = true, $auto = false)
201
+function db_field_bigint($unsigned = true, $auto = false)
202 202
 {
203 203
 	return array(
204 204
 		'auto' => $auto,
205 205