#49161 [NEW]: Got null upon the MessageFormatter() class instantiation with empty pattern.

From: Date: Wed, 05 Aug 2009 00:29:03 +0000
Subject: #49161 [NEW]: Got null upon the MessageFormatter() class instantiation with empty pattern.
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2609@lists.php.net to get a copy of this message
From: maximgb at yandex dot ru Operating system: Windows XP SP2 PHP version: 5.3.0 PHP Bug Type: *Languages/Translation Bug description: Got null upon the MessageFormatter() class instantiation with empty pattern. Description: ------------ I've tryed to create the MessageFormatter class, from intl extension, passing an empty string for the constructor's second argument and I was pretty surprised to get NULL instead of object instance :) Reproduce code: --------------- $f = new MessageFormatter(Locale::getDefault(), ''); var_dump($f, is_object($f)); $f = MessageFormatter::create(Locale::getDefault(), ''); var_dump($f, is_object($f)); Expected result: ---------------- object(MessageFormatter)#1 (0) { } bool(true) object(MessageFormatter)#2 (0) { } bool(true) Actual result: -------------- NULL bool(false) NULL bool(false) -- Edit bug report at http://bugs.php.net/?id=49161&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49161&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49161&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49161&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49161&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49161&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49161&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49161&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49161&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49161&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49161&r=support Expected behavior: http://bugs.php.net/fix.php?id=49161&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49161&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49161&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49161&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49161&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49161&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49161&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49161&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49161&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49161&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49161&r=mysqlcfg

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