Skip to content
This repository was archived by the owner on Jul 7, 2022. It is now read-only.

Commit e2590cc

Browse files
committed
Merge pull request #36 from AD7six/plugin-table
Fix error when using plugin's table.
2 parents b4fa75d + 9d2730d commit e2590cc

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,12 @@ matrix:
3131

3232
before_script:
3333
- composer self-update
34-
- composer install --no-interaction --dev
34+
- composer install --no-interaction --prefer-source
3535
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
3636
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
3737
- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
3838
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"
3939

40-
- phpenv rehash
41-
- set +H
42-
4340
script:
4441
- sh -c "if [ '$DEFAULT' = '1' ]; then phpunit --stderr; fi"
4542
- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p -n --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"

src/Model/Behavior/ShadowTranslateBehavior.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ protected function _traverseClause(Query $query, $name = '', $config = [])
262262
public function beforeSave(Event $event, EntityInterface $entity, ArrayObject $options)
263263
{
264264
$locale = $entity->get('_locale') ?: $this->locale();
265-
$table = $this->_config['translationTable'];
266-
$newOptions = [$table => ['validate' => false]];
265+
$newOptions = [$this->_translationTable->alias() => ['validate' => false]];
267266
$options['associated'] = $newOptions + $options['associated'];
268267

269268
$this->_bundleTranslatedFields($entity);

0 commit comments

Comments
 (0)