diff options
| author | Christian Fowler <spider@viovio.com> | 2006-11-29 19:32:17 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2006-11-29 19:32:17 +0000 |
| commit | 6c63d1a0ce3fe5ec08547f572006a6e9e34fe884 (patch) | |
| tree | 361a094ebed5167ad10cb88986e13c10f6e43770 | |
| parent | fb3e9b22fdbf672623f82a5499a3f9771d590fcd (diff) | |
| download | users-6c63d1a0ce3fe5ec08547f572006a6e9e34fe884.tar.gz users-6c63d1a0ce3fe5ec08547f572006a6e9e34fe884.tar.bz2 users-6c63d1a0ce3fe5ec08547f572006a6e9e34fe884.zip | |
force string conversion to avoid NULL insert into users_cnxn.user_agent
| -rw-r--r-- | BitUser.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/BitUser.php b/BitUser.php index 090b59f..e7c47dd 100644 --- a/BitUser.php +++ b/BitUser.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.116 2006/11/26 12:51:58 squareing Exp $ + * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.117 2006/11/29 19:32:17 spiderr Exp $ * * Lib for user administration, groups and permissions * This lib uses pear so the constructor requieres @@ -12,7 +12,7 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * - * $Id: BitUser.php,v 1.116 2006/11/26 12:51:58 squareing Exp $ + * $Id: BitUser.php,v 1.117 2006/11/29 19:32:17 spiderr Exp $ * @package users */ @@ -40,7 +40,7 @@ define("ACCOUNT_DISABLED", -6); * Class that holds all information for a given user * * @author spider <spider@steelsun.com> - * @version $Revision: 1.116 $ + * @version $Revision: 1.117 $ * @package users * @subpackage BitUser */ @@ -204,7 +204,7 @@ class BitUser extends LibertyAttachable { if( $this->isRegistered() ) { $update['user_id'] = $this->mUserId; $update['ip'] = $_SERVER['REMOTE_ADDR']; - $update['user_agent'] = substr( $_SERVER['HTTP_USER_AGENT'], 0, 128 ); + $update['user_agent'] = (string)substr( $_SERVER['HTTP_USER_AGENT'], 0, 128 ); $update['get_count'] = 1; $update['cookie'] = $pSessionId; $result = $this->mDb->associateInsert( BIT_DB_PREFIX.'users_cnxn', $update ); |
