[PHP-BUG] Req #65656 [NEW]: Error message when type hinting is ambigious
From: ss23 at ss23 dot geek dot nz Operating system: PHP version: Irrelevant Package: *General Issues Bug Type: Feature/Change Request Bug description:Error message when type hinting is ambigious Description: When you type hint with a name of a type PHP has, the error message is ambiguous and confusing. Test script: --- function foo(boolean $bar) { var_dump($bar); } foo(true); Expected result: Catchable fatal error: Argument 1 passed to foo() must be an instance of the class boolean, non-class of type boolean given, called in /code/VhrCdK on line 11 and defined in /code/VhrCdK on line 3 This is just my first thoughts on how to make it less confusing. Other suggestions would be apperciated. Actual result: -- Catchable fatal error: Argument 1 passed to foo() must be an instance of boolean, boolean given, called in /code/VhrCdK on line 11 and defined in /code/VhrCdK on line 3 -- Edit bug report at https://bugs.php.net/bug.php?id=65656edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65656r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65656r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65656r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=65656r=fixed Fixed in release: https://bugs.php.net/fix.php?id=65656r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=65656r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=65656r=needscript Try newer version: https://bugs.php.net/fix.php?id=65656r=oldversion Not developer issue:https://bugs.php.net/fix.php?id=65656r=support Expected behavior: https://bugs.php.net/fix.php?id=65656r=notwrong Not enough info: https://bugs.php.net/fix.php?id=65656r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=65656r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=65656r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65656r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=65656r=dst IIS Stability: https://bugs.php.net/fix.php?id=65656r=isapi Install GNU Sed:https://bugs.php.net/fix.php?id=65656r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=65656r=float No Zend Extensions: https://bugs.php.net/fix.php?id=65656r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=65656r=mysqlcfg
[PHP-BUG] Bug #60184 [NEW]: Exception stack frame text is misleading/incorrect
From: Operating system: PHP version: Irrelevant Package: *General Issues Bug Type: Bug Bug description:Exception stack frame text is misleading/incorrect Description: The exception stack frame is created on line 2, however, it's thrown on line 3. Perhaps this text should be changed to instantiated ... on line 2 instead. As a related issue, if you had an exception factory, this would cause issues to no end in that you cannot see the line number when the exception really was thrown, you would only see the stack from inside the factory. Test script: --- ?php $e = new Exception(); throw $e; ? Expected result: Fatal error: Uncaught exception 'Exception' in /code/PRdMIg:2 Stack trace: #0 {main} thrown in /code/PRdMIg on line 3 OR Fatal error: Uncaught exception 'Exception' in /code/PRdMIg:2 Stack trace: #0 {main} instantiated in /code/PRdMIg on line 2 Actual result: -- Fatal error: Uncaught exception 'Exception' in /code/PRdMIg:2 Stack trace: #0 {main} thrown in /code/PRdMIg on line 2 -- Edit bug report at https://bugs.php.net/bug.php?id=60184edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=60184r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=60184r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=60184r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=60184r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=60184r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=60184r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=60184r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=60184r=needscript Try newer version: https://bugs.php.net/fix.php?id=60184r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=60184r=support Expected behavior: https://bugs.php.net/fix.php?id=60184r=notwrong Not enough info: https://bugs.php.net/fix.php?id=60184r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=60184r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=60184r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=60184r=php4 Daylight Savings:https://bugs.php.net/fix.php?id=60184r=dst IIS Stability: https://bugs.php.net/fix.php?id=60184r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=60184r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=60184r=float No Zend Extensions: https://bugs.php.net/fix.php?id=60184r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=60184r=mysqlcfg
[PHP-BUG] Req #55036 [NEW]: Have crypt() throw E_WARNING when salt parameter missing
From: Operating system: PHP version: Irrelevant Package: *Encryption and hash functions Bug Type: Feature/Change Request Bug description:Have crypt() throw E_WARNING when salt parameter missing Description: Currently, you can call crypt('foo') without any problems, however, given how useless that is for anything, it's a security risk if someone was actually to do this. Test script: --- ?php crypt('foo'); Expected result: Warning: crypt() expects at least 2 parameters, 1 given Actual result: -- Works fine -- Edit bug report at http://bugs.php.net/bug.php?id=55036edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=55036r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=55036r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=55036r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=55036r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=55036r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=55036r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=55036r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=55036r=needscript Try newer version: http://bugs.php.net/fix.php?id=55036r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=55036r=support Expected behavior: http://bugs.php.net/fix.php?id=55036r=notwrong Not enough info: http://bugs.php.net/fix.php?id=55036r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=55036r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=55036r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=55036r=php4 Daylight Savings:http://bugs.php.net/fix.php?id=55036r=dst IIS Stability: http://bugs.php.net/fix.php?id=55036r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=55036r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=55036r=float No Zend Extensions: http://bugs.php.net/fix.php?id=55036r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=55036r=mysqlcfg
Req #55036 [Opn]: Have crypt() throw E_WARNING when salt parameter missing
Edit report at http://bugs.php.net/bug.php?id=55036edit=1 ID: 55036 User updated by:ss23 at ss23 dot geek dot nz Reported by:ss23 at ss23 dot geek dot nz Summary:Have crypt() throw E_WARNING when salt parameter missing Status: Open Type: Feature/Change Request Package:*Encryption and hash functions PHP Version:Irrelevant Block user comment: N Private report: N New Comment: Another possible way to fix the security risk here would be to choose a sane hash as a default. Now that they're built in, it shouldn't be a problem to do this. Previous Comments: [2011-06-11 21:00:55] ss23 at ss23 dot geek dot nz Description: Currently, you can call crypt('foo') without any problems, however, given how useless that is for anything, it's a security risk if someone was actually to do this. Test script: --- ?php crypt('foo'); Expected result: Warning: crypt() expects at least 2 parameters, 1 given Actual result: -- Works fine -- Edit this bug report at http://bugs.php.net/bug.php?id=55036edit=1