| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| */ | ||
| function _real_escape( $str ) { | ||
| return SQLite3::escapeString( $str ); | ||
| return addslashes( $str ); |
There was a problem hiding this comment.
This is the line that fixes #599
Sorry, something went wrong.
| if ( ! is_object( $row ) ) { | ||
| continue; | ||
| } | ||
| if ( property_exists( $row, 'name' ) ) { | ||
| $_columns['Field'] = $row->name; | ||
| } | ||
| if ( property_exists( $row, 'type' ) ) { | ||
| $_columns['Type'] = $row->type; | ||
| } | ||
| if ( property_exists( $row, 'notnull' ) ) { | ||
| $_columns['Null'] = $row->notnull ? 'NO' : 'YES'; | ||
| } | ||
| if ( property_exists( $row, 'pk' ) ) { | ||
| $_columns['Key'] = $row->pk ? 'PRI' : ''; | ||
| } | ||
| if ( property_exists( $row, 'dflt_value' ) ) { | ||
| $_columns['Default'] = $row->dflt_value; | ||
| } | ||
| $_results[] = new Perflab_SQLite_Object_Array( $_columns ); |
There was a problem hiding this comment.
This is some additional defensive coding to ensure there are no errors.
Sorry, something went wrong.
There was a problem hiding this comment.
@aristath Great work!
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks @aristath Now everything is good with import.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #599
In addition to the above fix, I encountered some other notices when testing various plugins:
This PR adds some additional checks to ensure that $row is an object, and the properties exist before using them.