Forum

Thread tagged as: Error

Incorrect docblock for PerchFieldType::$raw_item

In PerchFieldType.class.php we have:

/**
     * The un-processed item
     *
     * @var array
     */
    protected $raw_item = false;

But $raw_item may also be a string. This is a public-facing property, which may be interacted with using custom field types, so the incorrect documentation is triggering warnings in our own codebase.

Mark Fisher

Mark Fisher 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Understand that whilst the codebase is solid, parts of it are coming up for 10 years old. You're likely to find quite a few things that need refactoring. I basically bring things forward as they're touched.

I've changed the definition to @var array|string|false for now, but please don't think you need to raise a support ticket for every comment that has drifted out of alignment with the code as it won't be an affective use of your time.

O.K, I wasn't sure if this was something you supported, but now I know.