Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Casting TableCell value to string.#21430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
PHP throws a catchable fatal error when the value from this method isused in strstr in the Table class.
xabbuh commentedJan 27, 2017
Taking it strictly the current behaviour is not wing as the |
chalasr commentedJan 27, 2017
Looks like a feature to me, it is the expected behavior on 2.7. |
nicolas-grekas commentedJan 29, 2017
👍 on 2.7, minor tweak to me |
fabpot commentedJan 30, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I would only cast for ints then. |
xabbuh commentedFeb 3, 2017
@jaydiablo Can you make the change@fabpot asked for? :) |
jaydiablo commentedFeb 3, 2017
Sure, what about other numeric values that aren't ints? Like a float. Should we wrap the cast in something like: if (is_numeric($value) && !is_string($value)) { ? |
fabpot commentedFeb 3, 2017
My point was that I don't want to have a cast to a string for objects for instance. |
fabpot commentedFeb 3, 2017
Thank you@jaydiablo. |
This PR was squashed before being merged into the 2.7 branch (closes#21430).Discussion----------Casting TableCell value to string.| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#21429| License | MIT| Doc PR |PHP throws a catchable fatal error when the value from this method isused in strstr in the Table class. This fixes the error by casting to a string before returning the value.Commits-------1e5707f Casting TableCell value to string.
PHP throws a catchable fatal error when the value from this method is
used in strstr in the Table class. This fixes the error by casting to a string before returning the value.