Author |
Message |
emma
Hangin' Around

Joined: Nov 02, 2005
Posts: 32
|
Posted:
Thu Dec 22, 2005 6:57 pm |
|
I just finished an install of PHP Nuke version 7.6 with the 3.1 patch.
There is only one account registered right now, (which is the admin users account).
When I log into the account and go to the YOUR INFO module,
I notice that although I have enterd nothing in the field, the YOUR ICQ field has a zero in it ('0').
I deleted it and clicked on 'save changes', but it will not go away.
Does anyone know about this? Is it a known bug? |
_________________ I utilise the PHPNuke Version 7.6 software using the patch 3.1 also with the CNB 4.4.2 and NukeSentinel(tm) 2.3.2 |
|
|
 |
evaders99
Former Moderator in Good Standing

Joined: Apr 30, 2004
Posts: 3221
|
Posted:
Thu Dec 22, 2005 10:03 pm |
|
I think I see the problem
Code:
$user_icq = intval($user_icq);
|
The ICQ value is set to 0 because of intval, even if its empty. The existing check should also work here. Try..
Code:
if (preg_match('/^[0-9]+$/', $user_icq)) { $user_icq = intval($user_icq); }
else { $user_icq = ""; }
|
Haven't tested that, but it should work. I'll make sure its changed in the Patched files |
_________________ - Only registered users can see links on this board! Get registered or login! -
Need help? Only registered users can see links on this board! Get registered or login! |
|
|
 |
emma

|
Posted:
Fri Dec 23, 2005 6:22 am |
|
Hi Evaders99,
Thank you for replying to my cry for help.
I have a further small problem though...Which file should I be making the changes in?...You did not mention this. |
|
|
|
 |
evaders99

|
Posted:
Fri Dec 23, 2005 2:04 pm |
|
Ah sorry - modules/Your_Account/index.php
I've tested it and it seems to work just fine |
|
|
|
 |
emma

|
Posted:
Sat Dec 24, 2005 7:15 am |
|
Hi Evaders99,
Corect me if I am wrong, but I thought that your solution was simply to find the existing code:
$user_icq = intval($user_icq);
and replace this with the following code:
if (preg_match('/^[0-9]+$/', $user_icq)) { $user_icq = intval($user_icq); }
else { $user_icq = ""; }
...Is that correct? I did do this but the account still shows as '0' (zero) in the 'Your ICQ' field. |
|
|
|
 |
evaders99

|
Posted:
Sun Dec 25, 2005 12:01 am |
|
Just go and set it to empty - it should remain empty now |
|
|
|
 |
emma

|
Posted:
Sun Dec 25, 2005 3:34 am |
|
|
|
 |
evaders99

|
Posted:
Sun Dec 25, 2005 1:55 pm |
|
Blank, nothing, nothing in that field |
|
|
|
 |
emma

|
Posted:
Sun Dec 25, 2005 2:17 pm |
|
Ahhhh....Thank you for that dearest Evaders99 and Happy Christmas to you and all...It is now working, just as you said. |
|
|
|
 |
|