FAQ
Hi,
recent change in namespace code introduced new bug, please consider:

<?php
namespace tests;

class t1 {
function abc(\stdClass $std = null) {
}
}
?>

triggers "Fatal error: Default value for parameters with a class type hint can only be NULL" where the same w/o namespace definition works as
expected (no error).

this is tested with currently newest snap: 2008.11.09 23:30 (UTC)

I haven't filed bug report for this yet i'll do it if required.

TIA for quick fix ;-)
Marcin Kurzyna

Search Discussions

  • Stanislav Malyshev at Nov 10, 2008 at 4:10 am
    Hi!
    recent change in namespace code introduced new bug, please consider:
    Current code needs some change and cleanup, which will be done shortly.

    --
    Stanislav Malyshev, Zend Software Architect
    stas@zend.com http://www.zend.com/
    (408)253-8829 MSN: stas@zend.com
  • Felipe Pena at Nov 10, 2008 at 12:14 pm

    2008/11/9 Marcin Kurzyna <m.kurzyna@crystalpoint.pl>:
    Hi,
    recent change in namespace code introduced new bug, please consider:

    <?php
    namespace tests;

    class t1 {
    function abc(\stdClass $std = null) {
    }
    }
    ?>

    triggers "Fatal error: Default value for parameters with a class type hint can only be NULL" where the same w/o namespace definition works as
    expected (no error).

    this is tested with currently newest snap: 2008.11.09 23:30 (UTC)

    I haven't filed bug report for this yet i'll do it if required.
    Nice Marcin!
    I have added 4 new tests about that issue, that wasn't detected with
    the current tests.

    Thanks.

    --
    Regards,
    Felipe Pena.
  • Timm Friebe at Nov 11, 2008 at 1:36 pm
    Hi,
    recent change in namespace code introduced new bug, please consider:

    <?php
    namespace tests;

    class t1 {
    function abc(\stdClass $std = null) {
    }
    }
    ?>

    triggers "Fatal error: Default value for parameters with a class type hint
    can only be NULL"
    where the same w/o namespace definition works as expected (no error).
    http://sitten-polizei.de/php/zend-constants-lookup.diff might be a possible
    fix for this.

    - Timm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupphp-internals @
categoriesphp
postedNov 10, '08 at 1:08a
activeNov 11, '08 at 1:36p
posts4
users4
websitephp.net

People

Translate

site design / logo © 2022 Grokbase