I'm seeing the below error on two different installs. One is running Joomla 4/Civicrm 5.63.2 the other Joomla 3.10/civicrm 5.63.1, both php 8.0. If I change back to php 7.4 the error does not occur on either. It is shown when I edit the Amounts tab of any contribution page that has monetary transactions enabled and php set to 8.0 or 8.1 (I was not using a price set, just setting a few fixed price contribution options on the Amounts tab).

I'm not able to recreate it on the demo site that is running joomla 4, php8.0, civi 5.61.4.

I have determined that if the column name in the table civicrm_price_field_value is either blank or null the error is thrown. If I change them all for a particular contribution page to any other value it then works fine. (For example I changed all of one contribution page to item1, item2, ... using mysql access).

So I thought that perhaps i just had corrupted data. So I then created a new contribution page and then went back to edit the amounts tab - and got the same error again. Looking in the database shows the civicrm_price_field_value table name column to be null for the new rows.

So I think its one of two things:

  • a new install of civicrm uses NOT NULL DEFAULT "somevalue" for the name column of this table? (I doubt it I've looked on an older - but fresh install)
  • something changed between 5.61.4 (cividemo version) and 5.63.1 to cause this? Yet looking in the repo doesn't show Amounts.php getting changed?

I know I have been able to edit contribution pages previously, but I'm not sure exactly when that was. I thought it was very recently but perhaps it was back before I upgraded php to 8.0.

Sorry for the rambling, heading off on vacation and I wanted to post before I leave.

UPDATE: I remembered I had an older civicrm install (5.55.2). So I created a contribution page using that. (the name column for civicrm_price_field_value is indeed all null after the creation). Using php8.0 and this older version I'm able to go back and edit the amounts tab of this page. So I am beginning to think that a bug has been introduced sometime after 5.61.4.

Cannot assign an empty string to a string offset
234               $defaults['amount_label'] = $priceField['label'];
235               foreach ($options as $optionId => $optionValue) {
236                 $countRow++;
237                 $defaults['value'][$countRow] = $optionValue['amount'];
238                 $defaults['label'][$countRow] = $optionValue['label'] ?? NULL;
239                 $defaults['name'][$countRow] = $optionValue['name'] ?? NULL;
240                 $defaults['weight'][$countRow] = $optionValue['weight'];
242                 $defaults["price_field_value"][$countRow] = $optionValue['id'];
243                 if ($optionValue['is_default']) {
244                   $defaults['default'] = $countRow;-

1 Answer 1


I had a look at this and it turns out that this is a something that broke in 5.63 and we should be able to fix it for 5.64. Details here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.