0

my website ( wordpress ) is not displayed and the debug mode lets this appear

Required parameter $key_type follows optional parameter $data

service.php lines

    public function transform_data_to_our_format( $data = array(), $key_type, $exclude_keys = array() ) {
        if ( ! isset( $this->data_keys[ $key_type ] ) ) {
            return array();
        }

        return self::$_->array_transform( $data, $this->data_keys[ $key_type ], '<-', $exclude_keys );
    }

    /**
     * Transforms an array from the service provider's data format to our data format.
     *
     * @param array  $data         The data to be transformed.
     * @param string $key_type     The type of data. This corresponds to the key_type in {@link self::data_keys}.
     * @param array  $exclude_keys Keys that should be excluded from the transformed data.
     *
     * @return array
     */
    public function transform_data_to_provider_format( $data = array(), $key_type, $exclude_keys = array() ) {
        if ( ! isset( $this->data_keys[ $key_type ] ) ) {
            return array();
        }

        return self::$_->array_transform( $data, $this->data_keys[ $key_type ], '->', $exclude_keys );
    }
  • Change PHP version
  • Disable all pluglins
  • Change default Theme
  • Enable Safe Mode

Do you have any idea?

IMSoP
  • 89,526
  • 13
  • 117
  • 169
  • By including = array() it is essentially saying that is optional. However, optional should in theory be at the end and required should be together at the beginning. An easy solution if you know $key_type is a string is try **$key_type = ""** that would make it optional even through where it is called probably always fills it in – imvain2 May 03 '23 at 21:52
  • Not sure to understand can you explain more please ? – antoine santoro May 03 '23 at 21:55
  • Change this **$data = array(), $key_type, $exclude_keys = array()** to **$data = array(), $key_type = "", $exclude_keys = array()** – imvain2 May 03 '23 at 21:58

0 Answers0