Edit report at https://bugs.php.net/bug.php?id=55705&edit=1

 ID:                 55705
 Comment by:         ni...@php.net
 Reported by:        mikko dot petteri dot hirvonen at gmail dot com
 Summary:            Omitting a callable typehinted argument causes a
                     segfault
 Status:             Assigned
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Mac OS X 10.7 Lion
 PHP Version:        5.4.0beta1
 Assigned To:        dmitry
 Block user comment: N
 Private report:     N

 New Comment:

@laruence: Could you maybe change the added error message to use "be callable" 
instead of "be of the type callback" just like the other callable error 
message? That way it would be more consistent :)


Previous Comments:
------------------------------------------------------------------------
[2011-09-16 08:59:53] larue...@php.net

The following patch has been added/updated:

Patch Name: bug55705.phpt
Revision:   1316163593
URL:        
https://bugs.php.net/patch-display.php?bug=55705&patch=bug55705.phpt&revision=1316163593

------------------------------------------------------------------------
[2011-09-16 08:46:23] larue...@php.net

dmitry, plz look at this, thanks

------------------------------------------------------------------------
[2011-09-16 08:45:43] larue...@php.net

The following patch has been added/updated:

Patch Name: bug55705.phpt
Revision:   1316162743
URL:        
https://bugs.php.net/patch-display.php?bug=55705&patch=bug55705.phpt&revision=1316162743

------------------------------------------------------------------------
[2011-09-16 08:42:28] larue...@php.net

The following patch has been added/updated:

Patch Name: bug55705.diff
Revision:   1316162548
URL:        
https://bugs.php.net/patch-display.php?bug=55705&patch=bug55705.diff&revision=1316162548

------------------------------------------------------------------------
[2011-09-16 07:17:19] mikko dot petteri dot hirvonen at gmail dot com

Description:
------------
Omitting a callable typehinted argument from a function call causes a 
segmentation fault.

Configured with:
export MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS="-arch x86_64" CXXFLAGS="-arch 
x86_64"
configure --prefix=/usr/local/php-5.4.0beta1


Test script:
---------------
<?php

function f(callable $c) {}
f();


Expected result:
----------------
Catchable fatal error: Argument 1 passed to f() must be of the type callable, 
none given, called in %s on line 4 and defined in %s on line 3

Actual result:
--------------
Segmentation fault: 11


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=55705&edit=1

Reply via email to