Skip to content

Commit

Permalink
Fixed undefined index: conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
jupitercow committed Jul 2, 2015
1 parent f2a729d commit f05ba79
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions gravityforms-update-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: Gravity Forms: Post Updates
* Plugin URI: https://wordpress.org/plugins/gravity-forms-post-updates/
* Description: Allow Gravity Forms to update post content and the meta data associated with a post.
* Version: 1.2.22
* Version: 1.2.23
* Author: Jupitercow
* Author URI: http://Jupitercow.com/
* Contributer: ekaj
Expand Down Expand Up @@ -40,7 +40,7 @@ class gform_update_post
* @since 1.2
* @var string
*/
const VERSION = '1.2.21';
const VERSION = '1.2.23';

/**
* Settings
Expand Down Expand Up @@ -932,7 +932,7 @@ public static function gform_pre_render( $form )
{
foreach ( $field['conditionalLogic']['rules'] as $rule )
{
if (! $form['conditional'] ) {
if ( empty($form['conditional']) ) {
$form['conditional'] = array();
}
$form['conditional'][] = $rule['fieldId'];
Expand Down Expand Up @@ -1237,7 +1237,7 @@ public static function current_user_can( $post_id=false )
return false;
}

$capability = ( 'page' == $post_type ) ? 'edit_pages' : 'edit_posts';
$capability = ( 'page' == $post_type ) ? 'edit_page' : 'edit_post';

if ( current_user_can($capability, $post_id) ) {
return true;
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: jcow, ekaj, jr00ck, p51labs
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jacobsnyder%40gmail%2ecom&lc=US&item_name=Jacob%20Snyder&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted
Tags: gravity forms, update posts, frontend, front end
Requires at least: 3.6.1
Tested up to: 4.1.1
Stable tag: 1.2.22
Tested up to: 4.2.2
Stable tag: 1.2.23
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -116,6 +116,10 @@ It usually means you are running PHP 5.2.x on your server. I know WordPress supp

== Changelog ==

= 1.2.23 - 2015-07-02 =

- Fixed undefined index: conditional.

= 1.2.22 - 2015-06-18 =

- Fixed undeclared post_id.
Expand Down

0 comments on commit f05ba79

Please sign in to comment.