Issues (621)

Security Analysis    not enabled

This project does not seem to handle request data directly as such no vulnerable execution paths were found.

  Cross-Site Scripting
Cross-Site Scripting enables an attacker to inject code into the response of a web-request that is viewed by other users. It can for example be used to bypass access controls, or even to take over other users' accounts.
  File Exposure
File Exposure allows an attacker to gain access to local files that he should not be able to access. These files can for example include database credentials, or other configuration files.
  File Manipulation
File Manipulation enables an attacker to write custom data to files. This potentially leads to injection of arbitrary code on the server.
  Object Injection
Object Injection enables an attacker to inject an object into PHP code, and can lead to arbitrary code execution, file exposure, or file manipulation attacks.
  Code Injection
Code Injection enables an attacker to execute arbitrary code on the server.
  Response Splitting
Response Splitting can be used to send arbitrary responses.
  File Inclusion
File Inclusion enables an attacker to inject custom files into PHP's file loading mechanism, either explicitly passed to include, or for example via PHP's auto-loading mechanism.
  Command Injection
Command Injection enables an attacker to inject a shell command that is execute with the privileges of the web-server. This can be used to expose sensitive data, or gain access of your server.
  SQL Injection
SQL Injection enables an attacker to execute arbitrary SQL code on your database server gaining access to user data, or manipulating user data.
  XPath Injection
XPath Injection enables an attacker to modify the parts of XML document that are read. If that XML document is for example used for authentication, this can lead to further vulnerabilities similar to SQL Injection.
  LDAP Injection
LDAP Injection enables an attacker to inject LDAP statements potentially granting permission to run unauthorized queries, or modify content inside the LDAP tree.
  Header Injection
  Other Vulnerability
This category comprises other attack vectors such as manipulating the PHP runtime, loading custom extensions, freezing the runtime, or similar.
  Regex Injection
Regex Injection enables an attacker to execute arbitrary code in your PHP process.
  XML Injection
XML Injection enables an attacker to read files on your local filesystem including configuration files, or can be abused to freeze your web-server process.
  Variable Injection
Variable Injection enables an attacker to overwrite program variables with custom data, and can lead to further vulnerabilities.
Unfortunately, the security analysis is currently not available for your project. If you are a non-commercial open-source project, please contact support to gain access.

register.php (41 issues)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
/*
3
 * You may not change or alter any portion of this comment or credits
4
 * of supporting developers from this source code or any supporting source code
5
 * which is considered copyrighted (c) material of the original comment or credit authors.
6
 *
7
 * This program is distributed in the hope that it will be useful,
8
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10
 */
11
12
/**
13
 * SmallWorld
14
 *
15
 * @package      \XoopsModules\Smallworld
16
 * @license      GNU GPL (https://www.gnu.org/licenses/gpl-2.0.html/)
17
 * @copyright    The XOOPS Project (https://xoops.org)
18
 * @copyright    2011 Culex
19
 * @author       Michael Albertsen (http://culex.dk) <[email protected]>
20
 * @link         https://github.com/XoopsModules25x/smallworld
21
 * @since        1.0
22
 */
23
24
use XoopsModules\Smallworld;
25
use XoopsModules\Smallworld\Constants;
26
27
require_once __DIR__ . '/header.php';
28
29
$GLOBALS['xoopsOption']['template_main'] = 'smallworld_userprofile_regtemplate.tpl';
30
require_once XOOPS_ROOT_PATH . '/header.php';
31
32
/** @var \XoopsModules\Smallworld\Helper $helper */
33
require_once $helper->path('include/functions.php');
34
require_once $helper->path('include/arrays.php');
35
/**
36
 * Vars initialized via inclusion of ./include/arrays.php
37
 *
38
 * @var array $arr0
39
 * @var array $arr01
40
 * @var array $arr02
41
 * @var array $arr03
42
 * @var array $arr04
43
 * @var array $arr05
44
 * @var array $arr06
45
 * @var array $arr7
46
 */
47
48
$GLOBALS['xoopsLogger']->activated = false;
49
50
if (!isset($GLOBALS['xoopsUser']) || !$GLOBALS['xoopsUser'] instanceof \XoopsUser) {
0 ignored issues
show
The class XoopsUser does not exist. Did you forget a USE statement, or did you not list all dependencies?

This error could be the result of:

1. Missing dependencies

PHP Analyzer uses your composer.json file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects the composer.json to be in the root folder of your repository.

Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the require or require-dev section?

2. Missing use statement

PHP does not complain about undefined classes in ìnstanceof checks. For example, the following PHP code will work perfectly fine:

if ($x instanceof DoesNotExist) {
    // Do something.
}

If you have not tested against this specific condition, such errors might go unnoticed.

Loading history...
51
    redirect_header(XOOPS_URL . '/register.php', Constants::REDIRECT_DELAY_SHORT, _NOPERM);
52
}
53
54
$id      = $GLOBALS['xoopsUser']->uid();
55
//$check   = new Smallworld\User();
56
//$profile = $check->checkIfProfile($id);
57
$profile = $helper->getHandler('SwUser')->checkIfProfile($id);
58
59
// Check if inspected userid -> redirect to userprofile and show admin countdown
60
$inspect = smallworld_isInspected($id);
61 View Code Duplication
if ('yes' === $inspect['inspect']) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
62
    $helper->redirect('userprofile.php?username=' . $GLOBALS['xoopsUser']->uname(), Constants::REDIRECT_DELAY_SHORT);
63
}
64
65
if ($profile >= Constants::PROFILE_HAS_BOTH) {
66
    // Create basic user in db & redirect to editProfile.php
67
    $helper->redirect('editprofile.php');
68
} else {
69
    $item = new Smallworld\Form();
70
71
    // ------------ PERSONAL INFO ------------ //
72
73
    // Real name
74
    if (0 != smallworldGetValfromArray('realname', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
75
        $realname = $item->input('realname', 'realname', 'realname', $size = 30);
76
        $GLOBALS['xoopsTpl']->append('realname', $realname);
77
    } else {
78
        $GLOBALS['xoopsTpl']->assign('show_realname', 'no');
79
    }
80
81
    if (0 != smallworldGetValfromArray('gender', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
82
        // Dropdown for gender
83
        $gender = $item->dropdown('gender', $arr0, 0, '&nbsp;');
84
        $GLOBALS['xoopsTpl']->append('gender', $gender);
85
    } else {
86
        $GLOBALS['xoopsTpl']->assign('show_gender', 'no');
87
    }
88
89
    // Selectbox for "interested in gender(s)"
90
    if (0 != smallworldGetValfromArray('interestedin', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
91
        $intInGender = $item->radio('intingender', $arr01, 0, '&nbsp;');
92
        $GLOBALS['xoopsTpl']->append('intingender', $intInGender);
93
    } else {
94
        $GLOBALS['xoopsTpl']->assign('show_interestedin', 'no');
95
    }
96
97
    // Dropdown for marital status
98 View Code Duplication
    if (0 != smallworldGetValfromArray('relationshipstatus', 'smallworldusethesefields')) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
99
        $relationshipstatus = $item->dropdown('relationship', $arr02, 0);
100
        $GLOBALS['xoopsTpl']->append('relationshipstatus', $relationshipstatus);
101
102
        // Partner. Only shown if marital status is married, it's complicated, engaged)
103
        $partner = $item->input('partner', 'partner', 'partner', $size = '30', $preset = null);
104
        $GLOBALS['xoopsTpl']->append('partner', $partner);
105
    } else {
106
        $GLOBALS['xoopsTpl']->assign('show_relationshipstatus', 'no');
107
    }
108
109
    // Checkbox for searchin for
110
    if (0 != smallworldGetValfromArray('lookingfor', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
111
        $searchrelat = $item->radio('searchrelat', $arr03, 0);
112
        $GLOBALS['xoopsTpl']->append('searchrelat', $searchrelat);
113
    } else {
114
        $GLOBALS['xoopsTpl']->assign('show_lookingfor', 'no');
115
    }
116
117
    // Select Birthday dd-mm-Y
118 View Code Duplication
    if (0 != smallworldGetValfromArray('birthday', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
119
        //$birthEle = new \XoopsFormText('', 'birthday', 12, 12);
120
        //$birthEle->setExtra("class='birthday smallworld_select'");
121
        //$birthday = $birthEle->render();
122
        $birthday = $item->input('birthday', 'birthday', 'birthday', $size = '12', $preset = null);
123
        $GLOBALS['xoopsTpl']->append('birthdaydate', $birthday);
124
    } else {
125
        $GLOBALS['xoopsTpl']->assign('show_birthday', 'no');
126
    }
127
128
    // Select Hometown or Enter new
129 View Code Duplication
    if (0 != smallworldGetValfromArray('birthplace', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
130
        $birthplace = $item->input('birthplace', 'birthplace', 'birthplace', $size = '50', $preset = null);
131
        $GLOBALS['xoopsTpl']->append('birthplace', $birthplace);
132
    } else {
133
        $GLOBALS['xoopsTpl']->assign('show_birthplace', 'no');
134
    }
135
136
    // Dropdown politics
137
    if (0 != smallworldGetValfromArray('politicalview', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
138
        $politic = $item->dropdown('politic', $arr04, 0);
139
        $GLOBALS['xoopsTpl']->append('politic', $politic);
140
    } else {
141
        $GLOBALS['xoopsTpl']->assign('show_political', 'no');
142
    }
143
144
    // Dropdown Religion
145
    if (0 != smallworldGetValfromArray('religiousview', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
146
        $religion = $item->dropdown('religion', $arr05, 0);
147
        $GLOBALS['xoopsTpl']->append('religion', $religion);
148
    } else {
149
        $GLOBALS['xoopsTpl']->assign('show_religion', 'no');
150
    }
151
152
    // ------------ CONTACT INFO ------------ //
153
154
    // Add email test
155
    //function input_add($class, $name, $name2, $rel, $size, $textmore, $preset=null) {
156
    //$emailtext = $item->input('email','email','email',$size='12',$preset=null);
157
    if (0 != smallworldGetValfromArray('emails', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
158
        $emailtext = $item->input_add('smallworld_add2', 'email', 'emailtype', '.smallworld_clone2', 20, _SMALLWORLD_ADDMORE, $preset = $GLOBALS['xoopsUser']->getVar('email'), 'email-0');
159
        $emailtext .= "<span class='smallworld_remove' id='emailremove'><a href='javascript:void(0)' id='emailremovelnk'>" . _SMALLWORLD_REMOVE . '</a><br></span>';
160
        $emailtext .= "<a class='smallworld_addemail' href='javascript:void(0);' id='emailAdd'>" . _SMALLWORLD_ADDMORE . '</a><br><br>';
161
        $GLOBALS['xoopsTpl']->append('emailtext', $emailtext);
162
    } else {
163
        $GLOBALS['xoopsTpl']->assign('show_emails', 'no');
164
    }
165
166
    // Drop down for screen names
167
    /*dropdown_add ($name, $name2, $rel, array $options, $textmore, $selected=null) {*/
168
    if (0 != smallworldGetValfromArray('screennames', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
169
        $screenname = $item->dropdown_add('smallworld_add', 'screenname', 'screenname_type', '.smallworld_clone', $arr06, _SMALLWORLD_ADDMORE, $selected = null, $preset = null);
170
        $screenname .= "<span class='smallworld_remove' id='screennameremove'>";
171
        $screenname .= "<a href='javascript:void(0);' id='screennameremovelnk'>" . _SMALLWORLD_REMOVE . '</a><br></span>';
172
        $screenname .= "<a class='smallworld_addscreenname' href='javascript:void(0);' id='screennameAdd'>" . _SMALLWORLD_ADDMORE . '</a><br><br>';
173
        $GLOBALS['xoopsTpl']->append('screenname', $screenname);
174
    } else {
175
        $GLOBALS['xoopsTpl']->assign('show_screennames', 'no');
176
    }
177
178
    // Mobilephone
179 View Code Duplication
    if (0 != smallworldGetValfromArray('mobile', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
180
        $mobile = $item->input('mobile', 'mobile', 'mobile', 12, $preset = null);
181
        $GLOBALS['xoopsTpl']->append('mobile', $mobile);
182
    } else {
183
        $GLOBALS['xoopsTpl']->assign('show_mobile', 'no');
184
    }
185
186
    // Landphone
187 View Code Duplication
    if (0 != smallworldGetValfromArray('landphone', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
188
        $phone = $item->input('phone', 'phone', 'phone', 12, $preset = null);
189
        $GLOBALS['xoopsTpl']->append('phone', $phone);
190
    } else {
191
        $GLOBALS['xoopsTpl']->assign('show_landphone', 'no');
192
    }
193
194
    // Adress
195 View Code Duplication
    if (0 != smallworldGetValfromArray('streetadress', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
196
        $adress = $item->input('adress', 'adress', 'adress', $size = '50', $preset = null);
197
        $GLOBALS['xoopsTpl']->append('adress', $adress);
198
    } else {
199
        $GLOBALS['xoopsTpl']->assign('show_adress', 'no');
200
    }
201
202 View Code Duplication
    if (0 != smallworldGetValfromArray('presentcity', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
203
        $present_city = $item->input('present_city', 'present_city', 'present_city', 50, $preset = null);
204
        $GLOBALS['xoopsTpl']->append('present_city', $present_city);
205
        $present_country = $item->input('present_country', 'present_country', 'present_country', $size = '50', $preset = null);
206
        $GLOBALS['xoopsTpl']->append('present_country', $present_country);
207
    } else {
208
        $GLOBALS['xoopsTpl']->assign('show_city', 'no');
209
    }
210
211
    if (0 == smallworldGetValfromArray('website', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
212
        $GLOBALS['xoopsTpl']->assign('show_website', 'no');
213
    }
214
215
    // ------------ INTERESTS ------------ //
216
217
    // Textarea for interests
218
    //textarea($name, $id, $title, $rows, $cols, $class)
219 View Code Duplication
    if (0 != smallworldGetValfromArray('interests', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
220
        $interests = $item->textarea('interests', 'interests', _SMALLWORLD_INTERESTS, 1, 20, 'favourites', $preset = $GLOBALS['xoopsUser']->getVar('user_intrest'));
221
        $GLOBALS['xoopsTpl']->append('interests', $interests);
222
    } else {
223
        $GLOBALS['xoopsTpl']->assign('show_interests', 'no');
224
    }
225
226
    // Textarea for Music
227 View Code Duplication
    if (0 != smallworldGetValfromArray('favouritemusic', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
228
        $music = $item->textarea('music', 'music', _SMALLWORLD_MUSIC, 1, 20, 'favourites');
229
        $GLOBALS['xoopsTpl']->append('music', $music);
230
    } else {
231
        $GLOBALS['xoopsTpl']->assign('show_music', 'no');
232
    }
233
234
    // Textarea for Tvshow
235 View Code Duplication
    if (0 != smallworldGetValfromArray('favouritetvshows', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
236
        $tvshow = $item->textarea('tvshow', 'tvshow', _SMALLWORLD_TVSHOW, 1, 20, 'favourites');
237
        $GLOBALS['xoopsTpl']->append('tvshow', $tvshow);
238
    } else {
239
        $GLOBALS['xoopsTpl']->assign('show_tv', 'no');
240
    }
241
242
    // Textarea for Movie
243 View Code Duplication
    if (0 != smallworldGetValfromArray('favouritemovies', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
244
        $movie = $item->textarea('movie', 'movie', _SMALLWORLD_MOVIE, 1, 20, 'favourites');
245
        $GLOBALS['xoopsTpl']->append('movie', $movie);
246
    } else {
247
        $GLOBALS['xoopsTpl']->assign('show_movies', 'no');
248
    }
249
250
    // Textarea for Books
251 View Code Duplication
    if (0 != smallworldGetValfromArray('favouritebooks', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
252
        $books = $item->textarea('books', 'books', _SMALLWORLD_BOOKS, 1, 20, 'favourites');
253
        $GLOBALS['xoopsTpl']->append('books', $books);
254
    } else {
255
        $GLOBALS['xoopsTpl']->assign('show_books', 'no');
256
    }
257
258
    // Textarea for About me
259 View Code Duplication
    if (0 != smallworldGetValfromArray('aboutme', 'smallworldusethesefields')) {
0 ignored issues
show
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
260
        $aboutme = $item->textarea('aboutme', 'aboutme', _SMALLWORLD_ABOUTME, 2, 20, 'favourites', $preset = $GLOBALS['xoopsUser']->getVar('bio', 'N'));
261
        $GLOBALS['xoopsTpl']->append('aboutme', $aboutme);
262
    } else {
263
        $GLOBALS['xoopsTpl']->assign('show_aboutme', 'no');
264
    }
265
266
    // ------------ SCHOOL ------------ //
267
    //School name
268 View Code Duplication
    if (0 != smallworldGetValfromArray('education', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
269
        $school = $item->school_add('smallworld_add3', 'school', 'school_type', '.smallworld_clone3', $arr7, _SMALLWORLD_ADDMORE, $selected = null, $preset = null, $selectedstart = null, $selectedstop = null);
270
        $school .= "<span class='smallworld_remove2' id='schoolremove'>";
271
        $school .= "<a href='javascript:void(0);' id='schoolremovelnk'>" . _SMALLWORLD_REMOVE . '</a><br></span>';
272
        $school .= "<a class='smallworld_addschool' href='javascript:void(0);' id='schoolAdd'>" . _SMALLWORLD_ADDMORE . '</a><br><br>';
273
        $GLOBALS['xoopsTpl']->append('school', $school);
274
    } else {
275
        $GLOBALS['xoopsTpl']->assign('show_school', 'no');
276
    }
277
278
    //Jobs
279
    //function job ($class, $name,$name2, $rel, array$options, $textmore, $selected=null, $preset=null, $selectedstart=null, $selectedstop=null) {
280 View Code Duplication
    if (0 != smallworldGetValfromArray('employment', 'smallworldusethesefields')) {
0 ignored issues
show
'smallworldusethesefields' is of type string, but the function expects a array.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
281
        $job = $item->job('smallworld_add4', 'job', 'job_type', '.smallworld_clone4', _SMALLWORLD_ADDMORE, $selected = null, $preset = null, $selectedstart = null, $selectedstop = null);
282
        $job .= "<span class='smallworld_remove3' id='jobremove'>";
283
        $job .= "<a href='javascript:void(0);' id='jobremovelnk'>" . _SMALLWORLD_REMOVE . '</a><br></span>';
284
        $job .= "<a class='smallworld_addjob' href='javascript:void(0);' id='jobAdd'>" . _SMALLWORLD_ADDMORE . '</a><br><br>';
285
        $GLOBALS['xoopsTpl']->append('job', $job);
286
    } else {
287
        $GLOBALS['xoopsTpl']->assign('show_jobs', 'no');
288
    }
289
290
    // Create hidden forms for birthcity
291
    $birthplace_lat         = $item->hidden('birthplace_lat', 'birthplace_lat', $preset = null);
292
    $birthplace_lng         = $item->hidden('birthplace_lng', 'birthplace_lng', $preset = null);
293
    $birthplace_country     = $item->hidden('birthplace_country', 'birthplace_country', $preset = null);
294
    $birthplace_country_img = $item->hidden('birthplace_country_img', 'birthplace_country_img', $preset = null);
295
    $GLOBALS['xoopsTpl']->append('birthplace_lat', $birthplace_lat);
296
    $GLOBALS['xoopsTpl']->append('birthplace_lng', $birthplace_lng);
297
    $GLOBALS['xoopsTpl']->append('birthplace_country', $birthplace_country);
298
    $GLOBALS['xoopsTpl']->append('birthplace_country_img', $birthplace_country_img);
299
300
    // Create hidden forms for present city
301
    $present_lat         = $item->hidden('present_lat', 'present_lat', $preset = null);
302
    $present_lng         = $item->hidden('present_lng', 'present_lng', $preset = null);
303
    $present_country_img = $item->hidden('present_country_img', 'present_country_img', $preset = null);
304
    //$present_country = $item->hidden('present_country','present_country',$preset=null);
305
    $GLOBALS['xoopsTpl']->append('present_lat', $present_lat);
306
    $GLOBALS['xoopsTpl']->append('present_lng', $present_lng);
307
    $GLOBALS['xoopsTpl']->append('present_country_img', $present_country_img);
308
    //$GLOBALS['xoopsTpl']->append('present_country',$present_country);
309
310
    $GLOBALS['xoopsTpl']->append('smallworld_register_title', _SMALLWORLD_REGRISTATION_TITLE);
311
    $GLOBALS['xoopsTpl']->assign('smallworld_beforesubmit', _SMALLWORLD_TEXTBEFORESUBMIT);
312
    $GLOBALS['xoopsTpl']->assign('smallworld_save', _SMALLWORLD_SUBMIT);
313
}
314
315
require_once XOOPS_ROOT_PATH . '/footer.php';
316