-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Compatibility with MySQL STRICT_TRANS_TABLE + removed some hardcoded urls, fixes #157 #158
Conversation
Now when clicking on INVOICE NOW, we can reach first step of a new invoice creation even with MySQL 5.6 default STRICT_TRANS_TABLE.
Thanks for submitting these changes. A concern I have is although this fixes seeding it's likely there will be other issues. We may want to set all fields to nullable. Do you know if this is a common issue with Laravel/Eloquent? |
Yes, there are many other issues on creating rows where all fields are not filled. I'm modifying migrations to allow null or have a default value, see these 2 last commits : https://github.com/sdebacker/invoice-ninja/commits/master |
Because sending an empty string to a integer column is not allowed with MySQL in STRICT_TRANS_TABLE mode.
“Since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and expr3 otherwise.” http://php.net/manual/en/language.operators.comparison.php
Now InvoiceNinja works well on my configuration with MySQL 5.6 STRICT. I also removed some hardcoded urls in templates and in routes.php. |
Amazing, thanks again for contributing. I'll try to test out your changes later today and then merge. I wasn't aware of the "? :" shortcut, that's handy. Also. some of the links were hard coded on purpose (ie, the email footers). I'll need to put these back. |
I'm happy my contribution can help the project. About the url in email views, is it part of the licence that the official url should stay in footer ? if not, I don't see why not use main url from config. |
Most people who setup the site are using it to send their own invoices. I hardcoded the links so setting the SITE_URL wouldn't cause people to try to sign up on their servers. It's not part of the license, you can make any changes you like as long as you leave the 'powered by...' footer. |
Compatibility with MySQL STRICT_TRANS_TABLE + removed some hardcoded urls, fixes #157
No description provided.