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

Fatal error: Uncaught TypeError: Return value of Give\Donors\CustomFields\Controllers\DonorDetailsController::getUniqueDonationFormsForDonor() must be of the type array, null returned #7130

Closed
3 tasks
flack opened this issue Dec 6, 2023 · 3 comments · Fixed by #7133
Labels
type: bug Existing functionality is broken

Comments

@flack
Copy link
Contributor

flack commented Dec 6, 2023

User Story

As an admin in the backend I go to the donors list (wp-admin/edit.php?post_type=give_forms&page=give-donors) and click a user who has not made any donations yet

Details

At the bottom of the page, I get the following PHP errors:

( ! ) Warning: array_map(): Expected parameter 2 to be an array, null given in wp-content/plugins/give/src/Donors/CustomFields/Controllers/DonorDetailsController.php on line 48
Call Stack
#	Time	Memory	Function	Location
1	0.0008	446480	{main}( )	.../edit.php:0
2	0.0009	447216	require_once( 'wp-admin/admin.php )	.../edit.php:10
3	0.9090	41342120	do_action( $hook_name = 'give_forms_page_give-donors' )	.../admin.php:259
4	0.9090	41342496	WP_Hook->do_action( $args = [0 => ''] )	.../plugin.php:517
5	0.9090	41342496	WP_Hook->apply_filters( $value = '', $args = [0 => ''] )	.../class-wp-hook.php:348
6	0.9090	41343248	give_donors_page( '' )	.../class-wp-hook.php:324
7	0.9091	41344000	give_render_donor_view( $view = 'overview', $callbacks = ['overview' => 'give_donor_view', 'delete' => 'give_donor_delete_view', 'notes' => 'give_donor_notes_view'] )	.../donors.php:117
8	0.9105	41351952	give_donor_view( $donor = class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' } )	.../donors.php:287
9	1.0133	41807768	do_action( $hook_name = 'give_donor_after_tables', ...$arg = variadic(class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }) )	.../donors.php:991
10	1.0133	41808144	WP_Hook->do_action( $args = [0 => class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = [...]; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = [...]; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { ... }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }] )	.../plugin.php:517
11	1.0133	41808144	WP_Hook->apply_filters( $value = '', $args = [0 => class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = [...]; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = [...]; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { ... }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }] )	.../class-wp-hook.php:348
12	1.0191	41831864	Give\Donors\ServiceProvider::Give\Donors\{closure:wp-content/plugins/give/src/Donors/ServiceProvider.php:61-66}( $legacyDonor = class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' } )	.../class-wp-hook.php:324
13	1.0344	42724568	Give\Donors\CustomFields\Controllers\DonorDetailsController->show( $donor = class Give\Donors\Models\Donor { protected $properties = ['id' => 'int', 'userId' => [...], 'createdAt' => 'DateTime', 'name' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'email' => 'string', 'prefix' => 'string', 'additionalEmails' => [...], 'totalAmountDonated' => 'Give\\Framework\\Support\\ValueObjects\\Money', 'totalNumberOfDonations' => 'int']; protected $relationships = ['donations' => 'has-many', 'subscriptions' => 'has-many']; protected $attributes = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; protected $original = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; private ${Give\Framework\Models\Model}cachedRelations = ['donations' => NULL] } )	.../ServiceProvider.php:65
14	1.0344	42724568	Give\Donors\CustomFields\Controllers\DonorDetailsController->getUniqueDonationFormsForDonor( $donor = class Give\Donors\Models\Donor { protected $properties = ['id' => 'int', 'userId' => [...], 'createdAt' => 'DateTime', 'name' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'email' => 'string', 'prefix' => 'string', 'additionalEmails' => [...], 'totalAmountDonated' => 'Give\\Framework\\Support\\ValueObjects\\Money', 'totalNumberOfDonations' => 'int']; protected $relationships = ['donations' => 'has-many', 'subscriptions' => 'has-many']; protected $attributes = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; protected $original = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; private ${Give\Framework\Models\Model}cachedRelations = ['donations' => NULL] } )	.../DonorDetailsController.php:24
15	1.0799	42963496	array_map( $callback = class Closure { virtual $closure = "Give\Donors\CustomFields\Controllers\DonorDetailsController::Give\Donors\CustomFields\Controllers\{closure}", public $parameter = ['$donation' => '<required>'] }, $arrays = NULL )	.../DonorDetailsController.php:48

( ! ) Warning: array_filter() expects parameter 1 to be array, null given in wp-content/plugins/give/src/Donors/CustomFields/Controllers/DonorDetailsController.php on line 52
Call Stack
#	Time	Memory	Function	Location
1	0.0008	446480	{main}( )	.../edit.php:0
2	0.0009	447216	require_once( 'wp-admin/admin.php )	.../edit.php:10
3	0.9090	41342120	do_action( $hook_name = 'give_forms_page_give-donors' )	.../admin.php:259
4	0.9090	41342496	WP_Hook->do_action( $args = [0 => ''] )	.../plugin.php:517
5	0.9090	41342496	WP_Hook->apply_filters( $value = '', $args = [0 => ''] )	.../class-wp-hook.php:348
6	0.9090	41343248	give_donors_page( '' )	.../class-wp-hook.php:324
7	0.9091	41344000	give_render_donor_view( $view = 'overview', $callbacks = ['overview' => 'give_donor_view', 'delete' => 'give_donor_delete_view', 'notes' => 'give_donor_notes_view'] )	.../donors.php:117
8	0.9105	41351952	give_donor_view( $donor = class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' } )	.../donors.php:287
9	1.0133	41807768	do_action( $hook_name = 'give_donor_after_tables', ...$arg = variadic(class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }) )	.../donors.php:991
10	1.0133	41808144	WP_Hook->do_action( $args = [0 => class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = [...]; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = [...]; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { ... }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }] )	.../plugin.php:517
11	1.0133	41808144	WP_Hook->apply_filters( $value = '', $args = [0 => class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = [...]; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = [...]; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { ... }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }] )	.../class-wp-hook.php:348
12	1.0191	41831864	Give\Donors\ServiceProvider::Give\Donors\{closure:wp-content/plugins/give/src/Donors/ServiceProvider.php:61-66}( $legacyDonor = class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' } )	.../class-wp-hook.php:324
13	1.0344	42724568	Give\Donors\CustomFields\Controllers\DonorDetailsController->show( $donor = class Give\Donors\Models\Donor { protected $properties = ['id' => 'int', 'userId' => [...], 'createdAt' => 'DateTime', 'name' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'email' => 'string', 'prefix' => 'string', 'additionalEmails' => [...], 'totalAmountDonated' => 'Give\\Framework\\Support\\ValueObjects\\Money', 'totalNumberOfDonations' => 'int']; protected $relationships = ['donations' => 'has-many', 'subscriptions' => 'has-many']; protected $attributes = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; protected $original = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; private ${Give\Framework\Models\Model}cachedRelations = ['donations' => NULL] } )	.../ServiceProvider.php:65
14	1.0344	42724568	Give\Donors\CustomFields\Controllers\DonorDetailsController->getUniqueDonationFormsForDonor( $donor = class Give\Donors\Models\Donor { protected $properties = ['id' => 'int', 'userId' => [...], 'createdAt' => 'DateTime', 'name' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'email' => 'string', 'prefix' => 'string', 'additionalEmails' => [...], 'totalAmountDonated' => 'Give\\Framework\\Support\\ValueObjects\\Money', 'totalNumberOfDonations' => 'int']; protected $relationships = ['donations' => 'has-many', 'subscriptions' => 'has-many']; protected $attributes = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; protected $original = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; private ${Give\Framework\Models\Model}cachedRelations = ['donations' => NULL] } )	.../DonorDetailsController.php:24
15	1.0811	42981064	array_filter( $arg = NULL, $callback = class Closure { virtual $closure = "Give\Donors\CustomFields\Controllers\DonorDetailsController::Give\Donors\CustomFields\Controllers\{closure}", public $parameter = ['$formId' => '<required>'] } )	.../DonorDetailsController.php:52

( ! ) Warning: array_unique() expects parameter 1 to be array, null given in wp-content/plugins/give/src/Donors/CustomFields/Controllers/DonorDetailsController.php on line 56
Call Stack
#	Time	Memory	Function	Location
1	0.0008	446480	{main}( )	.../edit.php:0
2	0.0009	447216	require_once( 'wp-admin/admin.php )	.../edit.php:10
3	0.9090	41342120	do_action( $hook_name = 'give_forms_page_give-donors' )	.../admin.php:259
4	0.9090	41342496	WP_Hook->do_action( $args = [0 => ''] )	.../plugin.php:517
5	0.9090	41342496	WP_Hook->apply_filters( $value = '', $args = [0 => ''] )	.../class-wp-hook.php:348
6	0.9090	41343248	give_donors_page( '' )	.../class-wp-hook.php:324
7	0.9091	41344000	give_render_donor_view( $view = 'overview', $callbacks = ['overview' => 'give_donor_view', 'delete' => 'give_donor_delete_view', 'notes' => 'give_donor_notes_view'] )	.../donors.php:117
8	0.9105	41351952	give_donor_view( $donor = class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' } )	.../donors.php:287
9	1.0133	41807768	do_action( $hook_name = 'give_donor_after_tables', ...$arg = variadic(class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }) )	.../donors.php:991
10	1.0133	41808144	WP_Hook->do_action( $args = [0 => class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = [...]; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = [...]; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { ... }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }] )	.../plugin.php:517
11	1.0133	41808144	WP_Hook->apply_filters( $value = '', $args = [0 => class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = [...]; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = [...]; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { ... }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }] )	.../class-wp-hook.php:348
12	1.0191	41831864	Give\Donors\ServiceProvider::Give\Donors\{closure:wp-content/plugins/give/src/Donors/ServiceProvider.php:61-66}( $legacyDonor = class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' } )	.../class-wp-hook.php:324
13	1.0344	42724568	Give\Donors\CustomFields\Controllers\DonorDetailsController->show( $donor = class Give\Donors\Models\Donor { protected $properties = ['id' => 'int', 'userId' => [...], 'createdAt' => 'DateTime', 'name' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'email' => 'string', 'prefix' => 'string', 'additionalEmails' => [...], 'totalAmountDonated' => 'Give\\Framework\\Support\\ValueObjects\\Money', 'totalNumberOfDonations' => 'int']; protected $relationships = ['donations' => 'has-many', 'subscriptions' => 'has-many']; protected $attributes = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; protected $original = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; private ${Give\Framework\Models\Model}cachedRelations = ['donations' => NULL] } )	.../ServiceProvider.php:65
14	1.0344	42724568	Give\Donors\CustomFields\Controllers\DonorDetailsController->getUniqueDonationFormsForDonor( $donor = class Give\Donors\Models\Donor { protected $properties = ['id' => 'int', 'userId' => [...], 'createdAt' => 'DateTime', 'name' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'email' => 'string', 'prefix' => 'string', 'additionalEmails' => [...], 'totalAmountDonated' => 'Give\\Framework\\Support\\ValueObjects\\Money', 'totalNumberOfDonations' => 'int']; protected $relationships = ['donations' => 'has-many', 'subscriptions' => 'has-many']; protected $attributes = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; protected $original = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; private ${Give\Framework\Models\Model}cachedRelations = ['donations' => NULL] } )	.../DonorDetailsController.php:24
15	1.0815	42997448	array_unique( $arg = NULL )	.../DonorDetailsController.php:56

( ! ) Warning: array_map(): Expected parameter 2 to be an array, null given in wp-content/plugins/give/src/Donors/CustomFields/Controllers/DonorDetailsController.php on line 56
Call Stack
#	Time	Memory	Function	Location
1	0.0008	446480	{main}( )	.../edit.php:0
2	0.0009	447216	require_once( 'wp-admin/admin.php )	.../edit.php:10
3	0.9090	41342120	do_action( $hook_name = 'give_forms_page_give-donors' )	.../admin.php:259
4	0.9090	41342496	WP_Hook->do_action( $args = [0 => ''] )	.../plugin.php:517
5	0.9090	41342496	WP_Hook->apply_filters( $value = '', $args = [0 => ''] )	.../class-wp-hook.php:348
6	0.9090	41343248	give_donors_page( '' )	.../class-wp-hook.php:324
7	0.9091	41344000	give_render_donor_view( $view = 'overview', $callbacks = ['overview' => 'give_donor_view', 'delete' => 'give_donor_delete_view', 'notes' => 'give_donor_notes_view'] )	.../donors.php:117
8	0.9105	41351952	give_donor_view( $donor = class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' } )	.../donors.php:287
9	1.0133	41807768	do_action( $hook_name = 'give_donor_after_tables', ...$arg = variadic(class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }) )	.../donors.php:991
10	1.0133	41808144	WP_Hook->do_action( $args = [0 => class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = [...]; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = [...]; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { ... }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }] )	.../plugin.php:517
11	1.0133	41808144	WP_Hook->apply_filters( $value = '', $args = [0 => class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = [...]; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = [...]; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { ... }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' }] )	.../class-wp-hook.php:348
12	1.0191	41831864	Give\Donors\ServiceProvider::Give\Donors\{closure:wp-content/plugins/give/src/Donors/ServiceProvider.php:61-66}( $legacyDonor = class Give_Donor { public $id = '151'; public $purchase_count = '0'; public $purchase_value = '0.000000'; public $email = '[email protected]'; public $emails = ['primary' => '[email protected]']; public $name = 'Ms. Firstname Lastname'; public $date_created = '2020-11-17 20:13:34'; public $payment_ids = ''; public $user_id = '0'; protected $notes = NULL; public $address = []; protected $db = class Give\Donors\Repositories\DonorRepositoryProxy { private $legacyDonorRepository = class Give_DB_Donors { ... }; private $donorRepository = class Give\Donors\Repositories\DonorRepository { ... }; public $table_name = 'wp_give_donors'; public $min_index_length = 191; public $version = '1.0'; public $primary_key = 'id' }; public $token = ''; public $verify_key = ''; public $verify_throttle = '0000-00-00 00:00:00' } )	.../class-wp-hook.php:324
13	1.0344	42724568	Give\Donors\CustomFields\Controllers\DonorDetailsController->show( $donor = class Give\Donors\Models\Donor { protected $properties = ['id' => 'int', 'userId' => [...], 'createdAt' => 'DateTime', 'name' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'email' => 'string', 'prefix' => 'string', 'additionalEmails' => [...], 'totalAmountDonated' => 'Give\\Framework\\Support\\ValueObjects\\Money', 'totalNumberOfDonations' => 'int']; protected $relationships = ['donations' => 'has-many', 'subscriptions' => 'has-many']; protected $attributes = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; protected $original = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; private ${Give\Framework\Models\Model}cachedRelations = ['donations' => NULL] } )	.../ServiceProvider.php:65
14	1.0344	42724568	Give\Donors\CustomFields\Controllers\DonorDetailsController->getUniqueDonationFormsForDonor( $donor = class Give\Donors\Models\Donor { protected $properties = ['id' => 'int', 'userId' => [...], 'createdAt' => 'DateTime', 'name' => 'string', 'firstName' => 'string', 'lastName' => 'string', 'email' => 'string', 'prefix' => 'string', 'additionalEmails' => [...], 'totalAmountDonated' => 'Give\\Framework\\Support\\ValueObjects\\Money', 'totalNumberOfDonations' => 'int']; protected $relationships = ['donations' => 'has-many', 'subscriptions' => 'has-many']; protected $attributes = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; protected $original = ['id' => 151, 'userId' => 0, 'createdAt' => class DateTime { ... }, 'name' => 'Firstname Lastname', 'firstName' => 'Sandra', 'lastName' => 'Schuler', 'email' => '[email protected]', 'prefix' => 'Ms.', 'additionalEmails' => [...], 'totalAmountDonated' => class Give\Framework\Support\ValueObjects\Money { ... }, 'totalNumberOfDonations' => 0]; private ${Give\Framework\Models\Model}cachedRelations = ['donations' => NULL] } )	.../DonorDetailsController.php:24
15	1.0819	43013832	array_map( $callback = class Closure { virtual $closure = "Give\Donors\CustomFields\Controllers\DonorDetailsController::Give\Donors\CustomFields\Controllers\{closure}", public $parameter = ['$formId' => '<required>'] }, $arrays = NULL )	.../DonorDetailsController.php:56

( ! ) Fatal error: Uncaught TypeError: Return value of Give\Donors\CustomFields\Controllers\DonorDetailsController::getUniqueDonationFormsForDonor() must be of the type array, null returned in wp-content/plugins/give/src/Donors/CustomFields/Controllers/DonorDetailsController.php on line 56
( ! ) TypeError: Return value of Give\Donors\CustomFields\Controllers\DonorDetailsController::getUniqueDonationFormsForDonor() must be of the type array, null returned in wp-content/plugins/give/src/Donors/CustomFields/Controllers/DonorDetailsController.php on line 56
Call Stack
#	Time	Memory	Function	Location
        1	1.0824	43041776	Give\Framework\Exceptions\UncaughtExceptionLogger->handleException( $exception = class TypeError { protected $message = 'Return value of Give\\Donors\\CustomFields\\Controllers\\DonorDetailsController::getUniqueDonationFormsForDonor() must be of the type array, null returned'; private ${Error}string = ''; protected $code = 0; protected $file = 'wp-content/plugins/give/src/Donors/CustomFields/Controllers/DonorDetailsController.php'; protected $line = 56; private ${Error}trace = [0 => [...], 1 => [...], 2 => [...], 3 => [...], 4 => [...], 5 => [...], 6 => [...], 7 => [...], 8 => [...], 9 => [...], 10 => [...], 11 => [...], 12 => [...]]; private ${Error}previous = NULL; public $xdebug_message = '<tr><th align=\'left\' bgcolor=\'#f57900\' colspan="5"><span style=\'background-color: #cc0000; color: #fce94f; font-size: x-large;\'>( ! )</span> TypeError: Return value of Give\\Donors\\CustomFields\\Controllers\\DonorDetailsController::getUniqueDonationFormsForDonor() must be of the type array, null returned in wp-content/plugins/give/src/Donors/CustomFields/Controllers/DonorDetailsController.php on line <i>56</i></th></tr>\n<tr><th align=\'left\' bgcolor=\'#e9b96e\' colspan=\'5\'>Call Stack</th></tr>'... } )	.../UncaughtExceptionLogger.php:0

Expected Behavior

There shoudl be no errors

Steps to Reproduce

see above

System Information

Details

WordPress Environment

Home URL: http://localhost
Site URL: http://localhost
WP Version: 6.4.1
WP Multisite: –
WP Memory Limit: 1 GB
WP Debug Mode: ✔
WP Cron: ✔
Language: de_CH_informal
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Show on Front: page
Page on Front: hoempage.com (#9)
Page for Posts: Medienmitteilungen (#2469)
Table Prefix Length: wp_
Table Prefix Length: 3
Table Prefix Status: Acceptable
Admin AJAX: Verfügbar
Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, acf-disabled, refunded, failed, revoked, cancelled, abandoned, processing, preapproval, upgraded

Server Environment

Hosting Provider: DBH: localhost, SRV: rfp
TLS Connection: Verbindung verwendet TLS 1.3
TLS Connection: Probably Okay
Server Info: Apache/2.4.57 (Ubuntu)
PHP Version: 7.4.33
PHP Post Max Size: 208 MB
PHP Time Limit: 120
PHP Max Input Vars: 1000
PHP Max Upload Size: 200 MB
cURL Version: 8.2.1, OpenSSL/3.0.10
SUHOSIN Installed: –
MySQL Version: 8.0.35
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ❌Dein Server hat die Klasse SoapClient nicht aktiviert - manche Gateway-Plugins, die SOAP benutzen, werden nicht wie erwartet funktionieren.
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

GiveWP Configuration

GiveWP Version: 3.1.1
GiveWP Cache: Aktiviert
Database Updates: Alle Datenbank-Updates erfolgreich abgeschlossen.
Database Updates: All Database Migrations Completed.
Database Tables: ✔ wp_give_donors✔ wp_give_donormeta✔ wp_give_comments✔ wp_give_commentmeta✔ wp_give_sessions✔ wp_give_formmeta✔ wp_give_sequential_ordering✔ wp_give_donationmeta✔ wp_give_revenue✔ wp_give_migrations✔ wp_give_log
GiveWP Cache: Aktiviert
GiveWP Cache: ✔Neue Spende✔Spendenquittung✔Donation Processing Receipt✔Neue Offline-Spende✔Anweisung für Überweisungen❌Neue Benutzerregistrierung✔Informationen zur Benutzerregistrierung❌Donation Note✔E-Mail-Zugang✔Starte dein Projekt Email✔ProjektUpdate✔Erlaubnis des/der Erziehungsberechtigten✔V. Spendenwunsch Organisation✔V. Spendenwunsch Privat✔Gebotwunsch✔Gebot wird gespendet✔Gebot wird nicht gespendet✔Gewinnendes Gebot bezahlt✔Versteigerung endet bald✔V. Spenden einholen Organisation✔V. Spenden einholen Privat✔V. Spendenbestätigung Organisation✔V. Spendenbestätigung Privat✔Benutzer Identifizierung Email
Upgraded From: 3.0.1
Test Mode: Aktiviert
Currency Code: CHF
Currency Position: Nachher
Decimal Separator: ,
Thousands Separator: '
Success Page: http://localhost/spenden-bestaetigung/
Failure Page: http://localhost/spende-gescheitert/
Donation History Page: http://localhost/donor-dashboard-3/
GiveWP Forms Slug: /donations/
Enabled Payment Gateways: Überweisung, Virtual payment, payrexx payment method
Default Payment Gateway: payrexx payment method
PayPal IPN Notifications: IPN received for #5851 ( 6VL290535B483072U ) on 07/28/2021 at 16:23. Status VERIFIED
Donor Email Access: Aktiviert
Stripe Webhook Notifications: 18.08.2021 1:14

Active GiveWP Add-ons

Other Active Plugins

Advanced Custom Fields: von WP Engine – 6.2.4
CCB Extras: von CONTENT CONTROL GmbH – 1.0.0
Health Check & Troubleshooting: von The WordPress.org community – 1.7.0
ProfilePress: von ProfilePress Membership Team – 4.14.0
Public Post Preview: von Dominik Schilling – 2.10.0
Redirection: von John Godley – 5.3.10
Smush: von WPMU DEV – 3.15.1
Stop Spammers: von Trumani – 2023.4.1
WP Fastest Cache: von Emre Vona – 1.2.2
WPForms Lite: von WPForms – 1.8.5.2
WP Mail SMTP: von WP Mail SMTP – 3.10.0
WP Multilang: von Valentyn Riaboshtan – 2.4.1
WP Reroute Email: von Sajjad Hossain – 1.5.0
Yoast SEO: von Team Yoast – 21.6

Inactive Plugins

Akismet Anti-spam: Spam Protection: von Automattic - Anti-spam Team – 5.3
Nextend Social Login: von Nextendweb – 3.1.11
WP Mail SMTP Pro: von WP Mail SMTP – 3.10.1

Theme

Name: Child Theme
Version:
Author URL: https://contentcontrol.berlin/
Child Theme: Ja
Parent Theme Name: Shapely
Parent Theme Version: 1.2.15
Parent Theme Author URL: https://colorlib.com/

Acceptance Criteria

  • Something happens when an action is taken.
  • Something does not happen when an action is taken.
  • Fixing behavior in Component A does not affect existing behavior in Component B.
@flack flack added the type: bug Existing functionality is broken label Dec 6, 2023
@jonwaldstein
Copy link
Contributor

@flack Thank you for reporting this. We are investigating the issue and working towards a resolution. We appreciate your patience.

Copy link

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 14 additional days. Note, if this Issue is reporting a bug, please reach out to our support at https://givewp.com/support. If this is a feature request, please see our feedback board at feedback.givewp.com — that’s the best place to make feature requests, unless you’re providing a PR.

@github-actions github-actions bot added the Stale label Jan 22, 2024
@kjohnson kjohnson removed the Stale label Jan 22, 2024
@kjohnson
Copy link
Member

Resolved by #7133.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Existing functionality is broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants