Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Gilles

format() has first argument as string

Hello,

I’v been getting a PHP Fatal TypeError on the format() function as its first argument type is string, but some other plugin assumes it can send the value as null. Wondering if the string type is intended or not.

Here is the function:

// admin-columns-pro/classes/ConditionalFormat/Service/Formatter.php
  /**
   * Comparisons are done case-insensitive
   */
  public function format( string $value, int $id, AC\Column $column ): string {

I filed a bug with the other plugin (Pods) but thought I would double-check on your side. Here is the bug report:
https://github.com/pods-framework/pods/issues/6965

Best,
Gilles

1 year, 4 months ago
Stefan van den Dungen Gronovius
Developer

Our ac/column/value hook should always return a string according to the Docblocks so technically the fix should also be in the Pods plugin. But since we use the callback in our own plugin, we also changed our code so that even when the value is not a string, it will not break. This will be patched in the next update.

Thank you very much for bringing this to our attention and for reporting the bug/patch to Pods which is already approved by Pods.

1 year, 4 months ago

You must be logged in to reply to this topic.