php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17776 arrays incorrectly assigned "NULL" type
Submitted: 2002-06-15 16:59 UTC Modified: 2002-06-15 23:14 UTC
From: adam at adeptsoftware dot com Assigned:
Status: Closed Package: Arrays related
PHP Version: 4.1.2 OS: winxp
Private report: No CVE-ID: None
 [2002-06-15 16:59 UTC] adam at adeptsoftware dot com
$Array = array();
gettype($Array) is NULL

$Array = (array)array();
gettype($Array) is NULL

$Array = array();
settype($Array, "array");
gettype($Array) is "array" finally

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-15 19:57 UTC] sniper@php.net
Can not reproduce with latest CVS. Please try PHP 4.2.1
Here's the script I used:

<?php

  $Array = array();
  echo gettype($Array);

?>

 [2002-06-15 23:14 UTC] adam at adeptsoftware dot com
Hmm it works now.  There appear to be other factors causing this.  I will see if I can figure it out.
 [2025-04-10 15:14 UTC] git@php.net
Automatic comment on behalf of remicollet
Revision: https://github.com/php/php-src/commit/389de7c6bf59e14145e932f4d3c0171803a3ba97
Log: Fix #17776 LDAP_OPT_X_TLS_REQUIRE_CERT can&#039;t be overridden
 [2025-04-10 15:14 UTC] git@php.net
-Status: Not a bug +Status: Closed
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jul 06 09:01:32 2025 UTC