starting on line 913 of locale.module their is a switch that doesn't properly have break; statements at the end of each case
Here's the code:
// Log the operation and return success flag.
switch ($status) {
case 'updated':
watchdog('locale', 'Updated JavaScript translation file for the language %language.', array('%language' => $language->name));
return TRUE;
case 'rebuilt':
watchdog('locale', 'JavaScript translation file %file.js was lost.', array('%file' => $locale_javascripts[$language->langcode]), WATCHDOG_WARNING);
// Proceed to the 'created' case as the JavaScript translation file has
// been created again.
case 'created':
watchdog('locale', 'Created JavaScript translation file for the language %language.', array('%language' => $language->name));
return TRUE;
case 'deleted':
watchdog('locale', 'Removed JavaScript translation file for the language %language because no translations currently exist for that language.', array('%language' => $language->name));
return TRUE;
case 'error':
watchdog('locale', 'An error occurred during creation of the JavaScript translation file for the language %language.', array('%language' => $language->name), WATCHDOG_ERROR);
return FALSE;
default:
// No operation needed.
return TRUE;
}
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1788602-locale-rebuild-js.patch | 1.45 KB | tim-e |
Comments
Comment #1
larowlanTagging
Comment #2
tim-e commentedPatch attached.
Comment #2.0
tim-e commentedInclude offending code
Comment #13
mstrelan commentedThe
rebuiltcase specifically has a comment as to why it has nobreak. Every other case has areturnso a break statement is unreachable (and would fail phpcs checks). I'm closing this issue, if you feel this is in error, feel free to reopen so we can discuss.