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

Problem reading empty sql file #25

Open
doorknob2 opened this issue Feb 7, 2014 · 1 comment
Open

Problem reading empty sql file #25

doorknob2 opened this issue Feb 7, 2014 · 1 comment

Comments

@doorknob2
Copy link

I loaded an existing (third party) component and clicked the 'DataDesigner' button. The process reads the sql update files in the component/sql/updates directory. There were about 40 files, about 25% of which were empty files. On reading an empty files, the process terminated with an error message:
File read error.
I made two changes. The first was to update the message to include the name of the offending file and the second to allow empty files to be processed.
I changed helpers/table/helper.php (v0.0.21) lines 95-100 from
if( ! $fContents = JFile::read($file))
{
EcrHtml::message('File read error', 'error');

                return $tables;
            }

to
$fContents = JFile::read($file);
if( !is_string($fContents))
{
EcrHtml::message('File read error: '.$file, 'error');

                return $tables;
            }
@elkuku
Copy link
Owner

elkuku commented Feb 7, 2014

This looks quite interesting. Any chance you could craft a Pull Request for this? This would also assure that you will receive full credits for your work. Would be awesome 😉

That said, the "Data Designer" is heavy work in progress and sadly I didn't found the time to make it work properly (yet)
Any help would be greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants