[Tickets #12154] Re: ActiveSync: SQL error with HTC Sensation

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Apr 4 13:52:30 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12154
------------------------------------------------------------------------------
  Ticket             | 12154
  Updated By         | Thomas Jarosch <thomas.jarosch at intra2net.com>
  Summary            | ActiveSync: SQL error with HTC Sensation
  Queue              | Horde Framework Packages
  Version            | Git master
  Type               | Bug
  State              | Resolved
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Michael Rubinsky
------------------------------------------------------------------------------


Thomas Jarosch <thomas.jarosch at intra2net.com> (2013-04-04 13:52) wrote:

Looks like we need to catch this in another place, I'm still getting  
the error.

I'm not sure if the fix before setDeviceInfo() is good enough.  
setDeviceInfo() does an "INSERT INTO" while the error message below  
contains an "UPDATE" SQL statement.

I think the real problem is in setDeviceProperties() since  
setDeviceInfo() already handles empty "$data->userAgent" strings.


Error message:
------------------------------------
2013-04-04T15:39:53+02:00 ERR: HORDE [horde] SQL QUERY FAILED:  
SQLSTATE[23000]: Integrity constraint violation: 19  
horde_activesync_device.device_agent may not be NULL
         UPDATE horde_activesync_device SET device_properties =
            
'a:5:{s:14:"Settings:Model";s:17:"HTCSensationZ710e";s:11:"Settings:OS
           ";s:13:"Android 4.0.3";s:21:"Settings:FriendlyName";s:19:"HTC
           Sensation
            
Z710e";s:13:"Settings:IMEI";s:16:"************3379";s:20:"Settings:Pho
           neNumber";s:13:"Not Available";}', device_agent = NULL  
WHERE device_id
           = 'HTC6C4153F09B63EAC481259E1F2E139' [pid 18297 on line 553  
of "/datastore/DEVEL/horde/framework/Db/lib/Horde/Db/Adapter/Base.php"
------------------------------------

I've also doubled-checked the new code is in place:

# pwd
/var/www/horde/libs/Horde

# ls -al ActiveSync.php
lrwxrwxrwx 1 root root 68 2013-04-03 14:33 ActiveSync.php ->  
/datastore/DEVEL/horde/framework/ActiveSync/lib/Horde/ActiveSync.php

# grep userAgent ActiveSync.php
             $userAgent = $this->_request->getHeader('User-Agent');
             $device->userAgent = empty($userAgent) ? 'Unknown' : $userAgent;






More information about the bugs mailing list