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

ErrorException Warning: Undefined variable $post_data #91

Open
mario-proteus-paypal opened this issue Feb 13, 2025 · 4 comments
Open

ErrorException Warning: Undefined variable $post_data #91

mario-proteus-paypal opened this issue Feb 13, 2025 · 4 comments

Comments

@mario-proteus-paypal
Copy link

sentry:
ErrorException
Warning: Undefined variable $post_data
Events
Users
Level: Warning
Unhandled
|
New
|
/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields
1
1

Resolve

Archive

Priority
Med
Assignee

All Envs

14D
Filter events…

Event
1

User
1
url
100%
https://store.pericialmed.com/checkout-2/
user
100%
187.61.122.200
release
100%
3.5.1
environment
100%
production
View all tags

Events
in this issue

First
Last
Recommended
All Events

2ffb3061
2 hours ago
|
JSON
Jump to:
Highlights
Stack Trace
Trace
Tags
Context
Replay
187.61.122.200

Chrome
133

Android

Linux
6.8.0-49-generic

php
8.4.3
3.5.1
production

Edit
handled
handled
no
level
level
warning
url
url
https://store.pericialmed.com/checkout-2/
Trace: Trace ID
918037447b304e56957d15525b8fc6c5

Newest

ErrorException
Warning: Undefined variable $post_data
mechanism
generic
handled
false
code
0
/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields at line 375

Set up Code Mapping
In App

	if(!$has_payer_fields) {
		$has_payer_fields = ((!is_null($payer_cpf_cnpj) && 
			strlen($payer_cpf_cnpj) > 11 && 
			!array_key_exists('billing_company', $post_data) && 
			!empty($post_data['billing_company'])) || 
			(array_key_exists('_'.$this->gateway->id.'_cpf_cnpj', $post_data) && !isset($post_data['_'.$this->gateway->id.'_payer_name'])));
	}
	if(!$has_payer_fields) {
			
		echo '<div class="form-row form-row-wide paghiper-payername-fieldset">

/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-pix-gateway.php in WC_Paghiper_Pix_Gateway::payment_fields at line 64
In App

/wp-content/plugins/woocommerce/templates/checkout/payment-method.php in include at line 30
In App

/wp-content/plugins/woocommerce/includes/wc-core-functions.php in wc_get_template at line 345
In App

/wp-content/plugins/woocommerce/templates/checkout/payment.php in include at line 30
In App

/wp-content/plugins/woocommerce/includes/wc-core-functions.php in wc_get_template at line 345
In App

/wp-content/plugins/woocommerce/includes/wc-template-functions.php in woocommerce_checkout_payment at line 2554
In App

Called from: /wp-includes/class-wp-hook.php in WP_Hook::apply_filters

Show 2 more frames

/wp-content/plugins/woocommerce/templates/checkout/form-checkout.php in include at line 59
In App

/wp-content/plugins/woocommerce/includes/wc-core-functions.php in wc_get_template at line 345
In App

/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php in WC_Shortcode_Checkout::checkout at line 373
In App

/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php in WC_Shortcode_Checkout::output at line 70
In App

/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php in WC_Shortcodes::shortcode_wrapper at line 72
In App

/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php in WC_Shortcodes::checkout at line 95
In App

Called from: /wp-includes/shortcodes.php in do_shortcode_tag

Show 5 more frames

/wp-content/themes/generatepress/content-page.php in require at line 73
In App

Called from: /wp-includes/template.php in load_template

Show 2 more frames

/wp-content/themes/generatepress/inc/theme-functions.php in generate_do_template_part at line 568
In App

/wp-content/themes/generatepress/page.php in include at line 34
In App

Called from: /wp-includes/template-loader.php in require_once

/wp-blog-header.php in require at line 19
In App

/index.php at line 17
In App

Set up your PHP app with Session Replay
Watch the errors and latency issues your users face

Set Up Now

View Full Trace
One other issue appears in the same trace. View Full Trace

TypeError/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields
array_key_exists(): Argument #2 ($array) must be of type array, null given
0.00ms0.00ms0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s

2
Trace

918037447b304e56957d15525b8fc6c5
0ms

Warning

Warning: Undefined variable $post_data ErrorException /wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php WC_Paghiper_Base_Gateway::payment_fields /wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields

Error

array_key_exists(): Argument #2 ($array) must be of type array, null given TypeError /wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php WC_Paghiper_Base_Gateway::payment_fields /wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields
View All Issue Tags

browser
browser
Chrome 133
browser.name
name
Chrome
client_os
client_os.name
name
Android
device
device
K
device.family
family
K
environment
environment
production
handled
handled
no
language
language
pt-BR
level
level
warning
mechanism
mechanism
generic
os
os
Linux 6.8.0-49-generic
os.name
name
Linux
release
release
3.5.1
runtime
runtime
php 8.4.3
runtime.name
name
php
server_name
server_name
s143839
url
url
https://store.pericialmed.com/checkout-2/
user
user
ip:187.61.122.200
wordpress
wordpress
6.7.2
User
Geography
São Luís de Montes Belos, Brazil (BR)
IP Address
187.61.122.200
Browser

Name
Chrome
Version
133
Operating System

Name
Android
Device
Brand
Generic_Android
Family
K
Model
K
Operating System

Build
#49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024
Kernel Version
Linux s143839 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024 x86_64
Name
Linux
Version
6.8.0-49-generic
Runtime

Name
php
sapi
fpm-fcgi
Version
8.4.3
Trace Details
Span ID
3d653572ea734c31
Status
unknown
Trace ID
918037447b304e56957d15525b8fc6c5
Grouped by: exception stack-trace, in-app exception stack-trace

Give Feedback
By Exception Stack-trace

Hash
287125cbce770b78e41feea4fcc1fdf9
Type
component
Grouping
system
exception
stack-trace
frame
filenameindex.php
context-linerequire DIR . '/wp-blog-header.php';
frame
filenamewp-blog-header.php
functionrequire
context-linerequire_once ABSPATH . WPINC . '/template-loader.php';
frame
filenametemplate-loader.php
functionrequire_once
context-lineinclude $template;

show 10 similar
frame
filename[internal]
functionpreg_replace_callback
frame
filenameshortcodes.php
functiondo_shortcode_tag
context-line$output = $m[1] . call_user_func( $shortcode_tags[ $tag ], $attr, $content, $tag ) . $m[6];
frame
filenameclass-wc-shortcodes.php
functionWC_Shortcodes::checkout
context-linereturn self::shortcode_wrapper( array( 'WC_Shortcode_Checkout', 'output' ), $atts );

show 14 similar
frame
filenameclass-wc-paghiper-base-gateway.php
functionWC_Paghiper_Base_Gateway::payment_fields
typeErrorException
By In-app Exception Stack-trace

Hash
2d71636aaf38172573d01dbf83855662
Type
component
Grouping
in-app
exception
stack-trace
frame
filenameindex.php
context-linerequire DIR . '/wp-blog-header.php';
frame
filenamewp-blog-header.php
functionrequire
context-linerequire_once ABSPATH . WPINC . '/template-loader.php';
frame
filenamepage.php
functioninclude
context-linegenerate_do_template_part( 'page' );

show 14 similar
frame
filenameclass-wc-paghiper-base-gateway.php
functionWC_Paghiper_Base_Gateway::payment_fields
typeErrorException

@henriqueccruz
Copy link
Collaborator

Olá @mario-proteus-paypal
Pegue nossa última versão por gentileza (v2.4.1-rc1) disponível aqui no Github e veja se resolve seu problema.
Aguardamos seu retorno.

Obrigado!

@proteusbr1
Copy link

olá @henriqueccruz, hoje deu esse erro. Pluging atualizado ontem.

ErrorException
Warning: Undefined variable $post_data
Events
Users
Level: Warning
Unhandled
|
New
|
/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields
6
4

Resolve

Archive

Priority
Med
Assignee

All Envs

14D
Filter events…

Events
6

Users
4
url
100%
https://store.pericialmed.com/checkout-2/
user
33%
2804:1b3:8146:822c:554f:c685:2941:76ee
release
100%
3.5.1
environment
100%
production
View all tags

Events
in this issue
First
Last
Recommended
All Events

9d29a5da
8 hours ago
|
JSON
Jump to:
Highlights
Stack Trace
Trace
Tags
Context
Replay
2804:18:1117:2af4:8da0:78f4:36b4:2788

Mobile Safari
18.1.1

iOS
18.1.1

Linux
6.8.0-49-generic

php
8.4.3
3.5.1
production

Edit
handled
handled
no
level
level
warning
url
url
https://store.pericialmed.com/checkout-2/
Trace: Trace ID
563581b192d6491892d26633f773aacf

Newest

ErrorException
Warning: Undefined variable $post_data
mechanism
generic
handled
false
code
0
/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields at line 377

Set up Code Mapping
In App

								strlen($payer_cpf_cnpj) > 11 && 
								is_array($post_data) &&
								array_key_exists('billing_company', $post_data) && 
								!empty($post_data['billing_company'])
							) || 
							(is_array($post_data) &&
								array_key_exists('_'.$this->gateway->id.'_cpf_cnpj', $post_data) && 
								array_key_exists('_'.$this->gateway->id.'_payer_name', $post_data) &&
								!empty($post_data['_'.$this->gateway->id.'_payer_name'])
							));
	}

/wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-pix-gateway.php in WC_Paghiper_Pix_Gateway::payment_fields at line 64
In App

/wp-content/plugins/woocommerce/templates/checkout/payment-method.php in include at line 30
In App

/wp-content/plugins/woocommerce/includes/wc-core-functions.php in wc_get_template at line 345
In App

/wp-content/plugins/woocommerce/templates/checkout/payment.php in include at line 30
In App

/wp-content/plugins/woocommerce/includes/wc-core-functions.php in wc_get_template at line 345
In App

/wp-content/plugins/woocommerce/includes/wc-template-functions.php in woocommerce_checkout_payment at line 2554
In App

Called from: /wp-includes/class-wp-hook.php in WP_Hook::apply_filters

Show 2 more frames

/wp-content/plugins/woocommerce/templates/checkout/form-checkout.php in include at line 59
In App

/wp-content/plugins/woocommerce/includes/wc-core-functions.php in wc_get_template at line 345
In App

/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php in WC_Shortcode_Checkout::checkout at line 373
In App

/wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-checkout.php in WC_Shortcode_Checkout::output at line 70
In App

/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php in WC_Shortcodes::shortcode_wrapper at line 72
In App

/wp-content/plugins/woocommerce/includes/class-wc-shortcodes.php in WC_Shortcodes::checkout at line 95
In App

Called from: /wp-includes/shortcodes.php in do_shortcode_tag

Show 5 more frames

/wp-content/themes/generatepress/content-page.php in require at line 73
In App

Called from: /wp-includes/template.php in load_template

Show 2 more frames

/wp-content/themes/generatepress/inc/theme-functions.php in generate_do_template_part at line 568
In App

/wp-content/themes/generatepress/page.php in include at line 34
In App

Called from: /wp-includes/template-loader.php in require_once

/wp-blog-header.php in require at line 19
In App

/index.php at line 17
In App

Set up your PHP app with Session Replay
Watch the errors and latency issues your users face

Set Up Now

View Full Trace
0.00ms0.00ms0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s0s

2
Trace

563581b192d6491892d26633f773aacf
0ms

Warning

Warning: Undefined variable $post_data ErrorException /wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php WC_Paghiper_Base_Gateway::payment_fields /wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields

Warning

Warning: Undefined variable $post_data ErrorException /wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php WC_Paghiper_Base_Gateway::payment_fields /wp-content/plugins/woo-boleto-paghiper/includes/class-wc-paghiper-base-gateway.php in WC_Paghiper_Base_Gateway::payment_fields
View All Issue Tags

browser
browser
Mobile Safari 18.1.1
browser.name
name
Mobile Safari
client_os
client_os
iOS 18.1.1
client_os.name
name
iOS
device
device
iPhone
device.family
family
iPhone
environment
environment
production
handled
handled
no
language
language
pt-BR
level
level
warning
mechanism
mechanism
generic
os
os
Linux 6.8.0-49-generic
os.name
name
Linux
release
release
3.5.1
runtime
runtime
php 8.4.3
runtime.name
name
php
server_name
server_name
s143839
url
url
https://store.pericialmed.com/checkout-2/
user
user
ip:2804:18:1117:2af4:8da0:78f4:36b4:2788
wordpress
wordpress
6.7.2
User
Geography
Cuiabá, Brazil (BR)
IP Address
2804:18:1117:2af4:8da0:78f4:36b4:2788
Browser

Name
Mobile Safari
Version
18.1.1
Operating System

Name
iOS
Version
18.1.1
Device

Brand
Apple
Family
iPhone
Model
iPhone
Operating System

Build
#49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024
Kernel Version
Linux s143839 6.8.0-49-generic #49-Ubuntu SMP PREEMPT_DYNAMIC Mon Nov 4 02:06:24 UTC 2024 x86_64
Name
Linux
Version
6.8.0-49-generic
Runtime

Name
php
sapi
fpm-fcgi
Version
8.4.3
Trace Details
Span ID
4d745a4cc860429b
Status
unknown
Trace ID
563581b192d6491892d26633f773aacf
Grouped by: exception stack-trace, in-app exception stack-trace

Give Feedback
By Exception Stack-trace

Hash
7c5663a80b2277257bd75aa484b11bad
Type
component
Grouping
system
exception
stack-trace
frame
filenameclass-wc-paghiper-base-gateway.php
functionWC_Paghiper_Base_Gateway::payment_fields
context-line(is_array($post_data) &&
frame
filenameclass-wc-paghiper-pix-gateway.php
functionWC_Paghiper_Pix_Gateway::payment_fields
context-linereturn $this->paghiper_gateway->payment_fields();

show 15 similar
frame
filename[internal]
functionpreg_replace_callback
frame
filenameshortcodes.php
functiondo_shortcode
context-line$content = preg_replace_callback( "/$pattern/", 'do_shortcode_tag', $content );
frame
filenameclass-wp-hook.php
functionWP_Hook::apply_filters
context-line$value = call_user_func_array( $the_['function'], $args );

show 10 similar
frame
filenameindex.php
context-linerequire DIR . '/wp-blog-header.php';
typeErrorException
By In-app Exception Stack-trace

Hash
f267d40f3cb38c6dcfb1e9522063beff
Type
component
Grouping
in-app
exception
stack-trace
frame
filenameclass-wc-paghiper-base-gateway.php
functionWC_Paghiper_Base_Gateway::payment_fields
context-line(is_array($post_data) &&
frame
filenameclass-wc-paghiper-pix-gateway.php
functionWC_Paghiper_Pix_Gateway::payment_fields
context-linereturn $this->paghiper_gateway->payment_fields();

show 15 similar
frame
filenameindex.php
context-linerequire DIR . '/wp-blog-header.php';
typeErrorException

@henriqueccruz
Copy link
Collaborator

@mario-proteus-paypal / @proteusbr1
Temos um novo release candidate (v2.4.1-rc3) disponível
Consegue atualizar sua instalação por gentileza?

Aguardo seu retorno

@proteusbr1
Copy link

@henriqueccruz Esse erro é com o plugin novo. Esse código que eu postei no segundo post não existia antes 2.4.1. Acabei de ver que te a vercao 2.4.2. Vou testar e de dou feedback amanhã.

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

3 participants