Skip to content

getLabel is deprecated. Use isRequired or isRepeated instead. #1084

@urbanovich

Description

@urbanovich

Hello,

I have bug with using last version of the library(v26.2):

{"exception":"[object] (ErrorException(code: 0): getLabel is deprecated. Use isRequired or isRepeated instead.
at /app/vendor/googleads/google-ads-php/src/Google/Ads/GoogleAds/Util/FieldMasks.php:356)

in code it's:

/**
     * @param FieldDescriptor $fieldDescriptor the field descriptor to check if it's repeated
     * @return bool true if the field descriptor is repeated
     */
    private static function isFieldRepeated(FieldDescriptor $fieldDescriptor)
    {
        return $fieldDescriptor->getLabel() === GPBLabel::REPEATED;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNeed triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions