|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #28353 yaz_record function not returning array
Submitted: 2004-05-10 20:53 UTC Modified: 2007-04-04 20:06 UTC
From: Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.3.6 OS: Linux
Private report: No CVE-ID: None
 [2004-05-10 20:53 UTC]
I am using the yaz_record funtion to return an individual record from the query.  I have specified the 'array' type as my 3rd parameter.  I am consistently getting a null result. When I specify the type as 'string' or 'raw', everything works well. 

Reproduce code:
$conn = yaz_connect(, array('persistent' => false));
yaz_search($conn, 'rpn', $phrase);


$hits = yaz_hits($conn);
echo "I have searched, returning $hits records ... ";
$record = yaz_record($conn, 1, 'array');

Expected result:
An associative array 

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-05-10 22:15 UTC]
yaz_record only returns array if either GRS-1 or MARC is 
received from server. This server returns SUTRS so it is impossible to
return array.

  yaz_syntax($conn, "GRS-1");
to tell server to return GRS-1. Specify this before yaz_search.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 09:01:26 2024 UTC