-
Notifications
You must be signed in to change notification settings - Fork 32
Update the code to not use trigger error or error log in production #208
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
base: master
Are you sure you want to change the base?
Conversation
The Plugin Check https://wordpress.org/plugins/plugin-check/ reports the following messages:
|
flock( $gitium_lock_handle, LOCK_UN ); | ||
fclose( $gitium_lock_handle ); | ||
} | ||
endif; | ||
|
||
// Merges the commits with remote and pushes them back | ||
function gitium_merge_and_push( $commits ) { | ||
global $git; | ||
global $git; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the indentation is inconsistent.
if ( $git->is_dirty() && $git->add() > 0 ) { | ||
$commit = $git->commit( $commitmsg ); | ||
if ( ! $commit ) { | ||
wp_die( 'Error: Could not commit local changes.', 'Gitium Error', [ 'response' => 500 ] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wp_die( 'Error: Could not commit local changes.', 'Gitium Error', [ 'response' => 500 ] ); | |
wp_die( 'Could not commit local changes.', 'Gitium Error', [ 'response' => 500 ] ); |
|
||
if ( ! gitium_merge_and_push( $commits ) ) { | ||
$error = $git->get_last_error(); | ||
wp_die( 'Error: Merge & push failed. ' . ( is_string( $error ) ? $error : '' ), 'Gitium Error', [ 'response' => 500 ] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wp_die( 'Error: Merge & push failed. ' . ( is_string( $error ) ? $error : '' ), 'Gitium Error', [ 'response' => 500 ] ); | |
wp_die( 'Merge & push failed. ' . ( is_string( $error ) ? $error : '' ), 'Gitium Error', [ 'response' => 500 ] ); |
No description provided.