Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added allowed type for ternary operator #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added allowed type for ternary operator #8

wants to merge 1 commit into from

Conversation

Big-Shark
Copy link

Bug Fix

PHP Notice: Undefined index: in /usr/share/php/PHP/CodeSniffer/Standards/Kohana/Sniffs/Operators/TernaryOperatorSniff.php on line 77
PHP Notice: Undefined index: in /usr/share/php/PHP/CodeSniffer/Standards/Kohana/Sniffs/Operators/TernaryOperatorSniff.php on line 104

Error Line: load('site.title');?>

…rds/Kohana/Sniffs/Operators/TernaryOperatorSniff.php on line 77


Error Line: <?=isset($title)?$title:Kohana::$config->load('site.title');?>
@anroots
Copy link

anroots commented May 9, 2013

This does not seem to fix the problem... or there is another, similar error present.

PHP Notice:  Undefined offset: -1 in /usr/share/php/PHP/CodeSniffer/File.php on line 2602
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpcs:0
PHP   2. PHP_CodeSniffer_CLI->process() /usr/bin/phpcs:37
PHP   3. PHP_CodeSniffer->process() /usr/share/php/PHP/CodeSniffer/CLI.php:614
PHP   4. PHP_CodeSniffer->processFile() /usr/share/php/PHP/CodeSniffer.php:466
PHP   5. PHP_CodeSniffer->_processFile() /usr/share/php/PHP/CodeSniffer.php:1273
PHP   6. PHP_CodeSniffer_File->start() /usr/share/php/PHP/CodeSniffer.php:1389
PHP   7. Kohana_Sniffs_Operators_TernaryOperatorSniff->process() /usr/share/php/PHP/CodeSniffer/File.php:492
PHP   8. Kohana_Sniffs_Operators_TernaryOperatorSniff->_evaluate_portion() /data/dev/kohana-standards/PHP/CodeSniffer/Standards/Kohana/Sniffs/Operators/TernaryOperatorSniff.php:117
PHP   9. PHP_CodeSniffer_File->findPrevious() /data/dev/kohana-standards/PHP/CodeSniffer/Standards/Kohana/Sniffs/Operators/TernaryOperatorSniff.php:145
  • PHPCS 1.5.0RC2
  • kohana-standards with the patch applied
  • PHP 5.4.* / Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants