Jump to content

Just a tiny modification

Featured Replies

Posted

Hey, I don't know where else to post this. It's nothing really. But I don't know why IPS made it like this.

admin/sources/base/ipsMember.php (2935-2942 lines)

But don't you think it's better to replace:

//-----------------------------------------
// Load the member?
//-----------------------------------------

if ( ! is_array( $member ) AND ( $member == intval( $member ) AND $member > 0 ) )
{
    $member = self::load( $member, 'all' );
}

With this?:

//-----------------------------------------
// Load the member?
//-----------------------------------------

if ( is_numeric( $member ) )
{
    $member = self::load( $member, 'all' );
}

Or maybe...

if ( is_numeric( $member ) AND $member > 0 )

Thanks for reading this boring post. :smile:

  • Community Expert
  • Management

is_numeric is a good substitute, but keep in mind that the following will return TRUE using is_numeric:

+0123.45e6
10.4
0b10100111001

Etc.

  • Author

I knew it! :devil: I knew IPS had something in mind :P

Good work..

Thank you :)

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.