|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-01-19 18:41 UTC] micronix at gmx dot net
Description:
------------
Hello,
if you created in an separated file a trait with phpdoc inside. The apache server reset the connection immediatly.
Test script:
---------------
/// Example.php
class Example
use ExampleTrait;
public function __construct()
{
echo $this->hello_world;
}
}
/// END OF Example.php
/// ExampleTrait.php
trait ExampleTrait {
/**
*
*/
public $hello_world = 'hello World ^^';
}
/// END OF ExampleTrait.php
Expected result:
----------------
The Apache server can not load the output of the page.
the connection was reset while the page was loading.
Patchesbug60809.phpt (last revision 2012-01-20 02:39 UTC by pierrick@php.net)60809.diff (last revision 2012-01-20 02:19 UTC by pierrick@php.net) Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
I can confirm that. smarr:~/svn/trunk$ sapi/cli/php doctest.php [Thu Jan 19 19:45:13 2012] Script: 'doctest.php' --------------------------------------- /Users/smarr/Projects/PHP-Traits/svn/trunk/Zend/zend_compile.c(131) : Block 0x1007c60e8 status: Beginning: Cached Freed (invalid) Start: OK End: OK --------------------------------------- Looks like zend_destroy_property_info thinks it should free something, which might already have been freed. Won't have time to look into that before the weekend. Sorry.Micronix was just a bit sloppy with typos etc. I tested on a trunk from 14th of Jan.: //doc.php <?php trait ExampleTrait { /** * */ public $hello_world = 'hello World ^^'; } //doctest.php <?php include('doc.php'); class Example { use ExampleTrait; public function __construct() { echo $this->hello_world; } }pierrick, I suggest doing like: char *doccomment = NULL; if () { doccomment = estrndup(); } thanks :)pierrick, I suggest doing like: char *doccomment = NULL; if () { doccomment = estrndup(); } thanks :)