[mythtv-commits] Ticket #7755: hostname lookup failed in mythweb

MythTV mythtv at cvs.mythtv.org
Tue Dec 15 22:01:09 UTC 2009


#7755: hostname lookup failed in mythweb
--------------------------------+-------------------------------------------
 Reporter:  sander@…            |       Owner:  kormoc 
     Type:  defect              |      Status:  new    
 Priority:  minor               |   Milestone:  unknown
Component:  Plugin - MythWeb    |     Version:  0.21   
 Severity:  medium              |     Mlocked:  0      
--------------------------------+-------------------------------------------
 Hostname lookup failed in includes\defines.php
 when using:
 {{{
 #27:  $uname = php_uname('n');
 }}}
 it returns a string instead of an array.
 so :

 {{{
 #31: define('hostname', empty($_SERVER['hostname']) ?
 trim($uname['nodename']) : $_SERVER['hostname']);
 }}}

 doesn't work. (it returns just only the first character of the hostname)
 Better to check if its an array :

 {{{

 #31: define('hostname', empty($_SERVER['hostname']) ?
 trim((is_array($uname) ? $uname['nodename'] : $uname)) :
 $_SERVER['hostname']);
 }}}



 php version: 5.2.11

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/7755>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list