I am completely baffled by what is going wrong. I had a version of my code that was running successfully, and after making the minor change of adding ;'s to the end of my endforeach and endif statements (to make it compatible with php 5.2), I got a ton of errors. They are all the same error though:
09-Jul-2015 07:47:26 US/Pacific] PHP Notice: Undefined index: in /Applications/MAMP/bin/php/php5.6.2/lib/php/PHP/CodeSniffer/File.php on line 3476
[09-Jul-2015 07:47:26 US/Pacific] PHP Stack trace:
[09-Jul-2015 07:47:26 US/Pacific] PHP 1. {main}() /Applications/MAMP/bin/php/php5.6.2/bin/phpcs:0
[09-Jul-2015 07:47:26 US/Pacific] PHP 2. PHP_CodeSniffer_CLI->runphpcs() /Applications/MAMP/bin/php/php5.6.2/bin/phpcs:25
[09-Jul-2015 07:47:26 US/Pacific] PHP 3. PHP_CodeSniffer_CLI->process() /Applications/MAMP/bin/php/php5.6.2/lib/php/PHP/CodeSniffer/CLI.php:95
[09-Jul-2015 07:47:26 US/Pacific] PHP 4. PHP_CodeSniffer->processFiles() /Applications/MAMP/bin/php/php5.6.2/lib/php/PHP/CodeSniffer/CLI.php:867
[09-Jul-2015 07:47:26 US/Pacific] PHP 5. PHP_CodeSniffer->processFile() /Applications/MAMP/bin/php/php5.6.2/lib/php/PHP/CodeSniffer.php:619
[09-Jul-2015 07:47:26 US/Pacific] PHP 6. PHP_CodeSniffer->_processFile() /Applications/MAMP/bin/php/php5.6.2/lib/php/PHP/CodeSniffer.php:1679
[09-Jul-2015 07:47:26 US/Pacific] PHP 7. PHP_CodeSniffer_File->start() /Applications/MAMP/bin/php/php5.6.2/lib/php/PHP/CodeSniffer.php:1801
[09-Jul-2015 07:47:26 US/Pacific] PHP 8. Generic_Sniffs_WhiteSpace_ScopeIndentSniff->process() /Applications/MAMP/bin/php/php5.6.2/lib/php/PHP/CodeSniffer/File.php:567
It gives me this error about 200 times each time I run the code. I'm using Sublime Text 3 with phpcs installed. I tried unistalling phpcs as well as removing it from my php folder, but it doesn't seem to affect it at all.
Anyone have any experience with this? Any idea what might be causing it?
EDITED:
I have since removed code sniffer package from Sublime Text 3, as well as removed the CodeSniffer folder alluded to in the error message, and I still get the exact same error message.