Loading...
 
Skip to main content

preg_quote(): Argument #1 ($str) must be of type string, Math_Formula_Element given

Status
Closed
Subject
preg_quote(): Argument #1 ($str) must be of type string, Math_Formula_Element given
Version
26.x
Regression from 25.x to 26.x
Category
  • Error
  • Community projects
  • Dogfood on a *.tiki.org site
Feature
Trackers
Resolution status
Fixed or Solved
Submitted by
Xavier de Pedro
Volunteered to solve
Victor Emanouilov
Lastmod by
Xavier de Pedro
Rating
(0)
Description

I just filed this bug report:
https://dev.tiki.org/item8492-Error-on-tiki-index_p-php-Too-late-to-modify-headers-error-shown-in-wizard-for-tiki-admins-in-new-installs

as user "xavi", thorugh File a bug wiki page.
After hitting save, I saw this error message (below) where the wiki page should have provided feedback to the user (plugin tracker feedback).

Copy to clipboard
preg_quote(): Argument #1 ($str) must be of type string, Math_Formula_Element given


Image

I did set the importance to 9 because it's very discouraging to new devs or users to attempt to report bugs at the bug tracker and have the sensation that their time and report might be lost (it triggers the sensation the tiki can be unreliable - dangerous effect to our comunity)

Solution

Victor wrote:

Fixed with commits:
5be09681 and 63297855 (and backported to 26.x)

Also updated "contains" documentation. The whole idea behind original implementation is a bit wrong as parentheses are used for formula and (1,2) doesn't really make sense for a vector value in that context. Also, ... is not the correct syntax. eval formula can be invoked by (eval ...) without the inner parentheses. I am not sure which tiki versions are affected but it must have been a while since this hasn't really worked.
The fixes include change of syntax and quite a few other bugs when managing activity stream rules and formula inspection of event triggers.

The actual issue was an advanced activity rule for the bug tracker which used the contains formula incorrectly. There were also a bunch of other issues saving activity rules and triggering them while saving (inspecting the formula). All fixed and deployed to dev.tiki.org


Source: https://avan.tech/item93747-dev-tiki-org-is-now-at-26x-but-if-you-report-a-bug-there-you-get-a-bug-So-this-is-a-challenge-with-dogfood

Importance
9
Easy to solve?
5
Priority
45
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
8493
Created
Saturday 05 August, 2023 18:32:21 UTC
by Xavier de Pedro
LastModif
Thursday 07 September, 2023 12:15:20 UTC


Show PHP error messages