Skip to content

Commit 1833065

Browse files
committed
Allow local skip of trim
1 parent c9c06f5 commit 1833065

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Controller/Component/CommonComponent.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ public function initialize(array $config): void {
3838
* emptiness. This needs to happen in communication layer to ensure
3939
* this for all other layers.
4040
*
41-
* Can be skipped for edge cases using `DataPreparation.notrim` Configure setting.
41+
* Can be skipped for edge cases using
42+
* - locally: beforeFilter() inside the specific controller
43+
* - globally: `DataPreparation.notrim` Configure setting.
4244
*
4345
* @param \Cake\Event\EventInterface $event
4446
* @return void
4547
*/
4648
public function startup(EventInterface $event) {
47-
if (Configure::read('DataPreparation.notrim')) {
49+
if ($this->getConfig('notrim') || Configure::read('DataPreparation.notrim')) {
4850
return;
4951
}
5052

0 commit comments

Comments
 (0)