Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Bug #19879 bitwise and operator '&' interpreted as reference by value
Submitted: 2013-04-02 22:24 UTC
From: dennisu Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.4.4)
PHP Version: 5.4.13 OS: Linux Debian 6
Roadmaps: (Not assigned)    
Subscription  


 [2013-04-02 22:24 UTC] dennisu (Dennis Ungelbach)
Description: ------------ The bitwise and operator '&' in the code below is interpreted as reference by value although there is a space between the operator and the variable $p. array( 'umask' => sprintf("%04o", @umask()), 'human' => $str, 'octal' => sprintf("0%o", 0777 & $p), 'decimal' => sprintf("%04o", $p) ), Expected result: ---------------- no error should be reported by cs Actual result: -------------- NotAllowed, Priorität: Hoch Call-time pass-by-reference calls are prohibited No description available. Please upgrade to latest checkstyle version.

Comments

 [2013-04-03 03:36 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fix committed to github repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/5cc2790a596e1cdfaafab77477 2f9b993a3db058