Doc #51906 [Fbk->Csd]: document that dns_get_record returns empty string on error

From: Date: Thu, 27 May 2010 00:41:15 +0000
Subject: Doc #51906 [Fbk->Csd]: document that dns_get_record returns empty string on error
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-4450@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=51906&edit=1 ID: 51906 Updated by: degeberg@php.net Reported by: ksenzee at gmail dot com Summary: document that dns_get_record returns empty string on error -Status: Feedback +Status: Closed Type: Documentation Problem Package: Documentation problem PHP Version: Irrelevant -Assigned To: +Assigned To: degeberg New Comment: Ah, that makes more sense. It's been fixed now and should show up in the manual in a few days. Thanks for the report. Previous Comments: ------------------------------------------------------------------------ [2010-05-27 02:40:19] degeberg@php.net Automatic comment from SVN on behalf of degeberg Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=299837 Log: Fixed PHP bug #51906, dns_get_record() returns false on failure. ------------------------------------------------------------------------ [2010-05-27 02:31:04] ksenzee at gmail dot com Hm. I misread my log, so I was too hasty in my original report. What I should have said is that on *error*, dns_get_record returns FALSE and triggers a warning: Warning: dns_get_record() [function.dns-get-record]: res_nsend() failed in ... I can't provide a test script that reliably makes dns_get_record() error out. I'm assuming it depends on network conditions and the like. ------------------------------------------------------------------------ [2010-05-27 01:52:12] degeberg@php.net I can't reproduce that. Could you give a script that results in that behavior along with the version of PHP you're using? daniel@daniel-laptop:~$ cat test.php <?php var_dump(dns_get_record('fooaskljdalskdj.com')); ?> daniel@daniel-laptop:~$ php -nv; php -n test.php PHP 5.3.3-dev (cli) (built: May 23 2010 12:30:56) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies array(0) { } daniel@daniel-laptop:~$ src/php-5.2.13/sapi/cli/php test.php array(0) { } ------------------------------------------------------------------------ [2010-05-25 18:18:50] ksenzee at gmail dot com Description: ------------ The documentation for dns_get_record says the return value is an array of associative arrays. It should also point out that if there is no DNS record for the domain being queried, it returns an empty string. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=51906&edit=1

« previous php.doc.bugs (#4450) next »