Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Invalid
-
3.0.x
-
None
-
None
-
PHP Environment:
Database:
Description
I'm sure i found a little bug:
Version 3.0.4.
Downloaded from: phpbb.nl
When trying to look at a users profile via the ACP, find member, administrate user, select form, profile.
I get the following ERROR..
SQL ERROR [ mysqli ]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '= 1 AND l.lang_id = AND l.field_id = ORDER BY' at line 3 [1064]
SQL
SELECT l., f. FROM phpbb3_profile_lang l, phpbb3_profile_fields f WHERE = 1 AND l.lang_id = AND l.field_id = ORDER BY
BACKTRACE
FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()
FILE: includes/functions_profile_fields.php
LINE: 66
CALL: dbal_mysqli->sql_query()
FILE: includes/acp/acp_users.php
LINE: 1238
CALL: custom_profile->generate_profile_fields()
FILE: includes/functions_module.php
LINE: 507
CALL: acp_users->main()
FILE: adm/index.php
LINE: 74
CALL: p_master->load_active()
After a search trough the above files i discoverd a typo? in the includes/functions_profile_fields.php
Original:
$sql = 'SELECT l., f.
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
WHERE f.field_active = 1
$sql_where
AND l.lang_id = $.lang_id
AND l.field_id = f.field_id
ORDER BY f.field_order";
$result = $db->sql_query($sql);
Changed:
$sql = 'SELECT l., f.
FROM ' . PROFILE_LANG_TABLE . ' l, ' . PROFILE_FIELDS_TABLE . " f
WHERE f.field_active = 1
$sql_where
AND l.lang_id = l.lang_id
AND l.field_id = f.field_id
ORDER BY f.field_order";
$result = $db->sql_query($sql);
Without the rest of the code:
Original: AND l.lang_id = $.lang_id
Changed: AND l.lang_id = l.lang_id
After changing, uploading and testing my problem was solved.......
Heijntje