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

Baking migration_diff throws an exception #464

Open
1 of 3 tasks
MrSnoop opened this issue Aug 8, 2020 · 1 comment
Open
1 of 3 tasks

Baking migration_diff throws an exception #464

MrSnoop opened this issue Aug 8, 2020 · 1 comment
Labels

Comments

@MrSnoop
Copy link

MrSnoop commented Aug 8, 2020

This is a (multiple allowed):

  • bug

  • enhancement

  • feature-discussion (RFC)

  • CakePHP Version: 4.1.1

  • Migrations plugin version: 3.0.0

  • Bake plugin version (if relevant): 2.1.2

  • Database server (MySQL, SQLite, Postgres): mysql 5.7

  • PHP Version: 7.3.19

  • Platform / OS: Debian 10

What you did

bin/cake bake migration_diff removedMigrationReleases

Expected Behavior

Migration file should have been created.

Actual Behavior

Exception is thrown. File has not been generated.

Exception: strpos() expects parameter 1 to be string, bool given
In [/var/www/app/api/vendor/cakephp/migrations/src/Command/BakeMigrationDiffCommand.php, line 454]

2020-08-08 12:58:52 Error: [TypeError] strpos() expects parameter 1 to be string, bool given in /var/www/app/api/vendor/cakephp/migrations/src/Command/BakeMigrationDiffCommand.php on line 454
Stack Trace:

  • /var/www/app/api/vendor/cakephp/migrations/src/Command/BakeMigrationDiffCommand.php:454
  • /var/www/app/api/vendor/cakephp/migrations/src/Command/BakeMigrationDiffCommand.php:116
  • /var/www/app/api/vendor/cakephp/migrations/src/Command/BakeSimpleMigrationCommand.php:91
  • /var/www/app/api/vendor/cakephp/cakephp/src/Console/BaseCommand.php:179
  • /var/www/app/api/vendor/cakephp/cakephp/src/Console/CommandRunner.php:336
  • /var/www/app/api/vendor/cakephp/cakephp/src/Console/CommandRunner.php:171
  • /var/www/app/api/bin/cake.php:12
@dereuromark
Copy link
Member

This might need a bit more data on how to reproduce this.
Like the migration file content etc.

Maybe you want to also make a PR to fix the type error?

WideeFr added a commit to WideeFr/cakePHP-migrations that referenced this issue Apr 7, 2023
markstory added a commit that referenced this issue Apr 13, 2023
#464 Fix error strpos if $lastfile is null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants