$result-variable-undefined-given-default-value#9277
Conversation
|
From where can i enable all errors in PHP and where can i find the method onContentAfterSave(). |
|
onContentAfterSave() is a method in plugins/content/joomla/joomla.php file. |
|
@brianteeman Please test the PR. |
|
Hi, In testing instruction, mentioned that "In the front-end, add a menu item "propose an article"." Here is my system information: This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9277. |
|
I have tested this item ✅ successfully on c177c67 Tested for @icampus This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9277. |
|
I have tested this item ✅ successfully on c177c67 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9277. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9277. |
|
Not sure because PHPCS should complain, do we need an empty line before foreach? |
|
Yes. |
|
@rdeutz please merge i can prepare a PR for fixing that. |
|
done counting on @zero-24 to clean it up. |
* re-arrayhelper-min: (2467 commits) Minimize JArrayHelper methods `toInteger`, `pivot`, `arrayUnique` by using Joomla\Utilities\ArrayHelper internally. Leaving (reverting from joomla#7782) other four methods as is for b/c reasons as mentioned in joomla#8455. remove platform include (joomla#11615) [GitHub Templates] Make headings bigger (joomla#11607) [com_contact] Make ACL core.edit.own work (PR for 11466) (joomla#11503) Small review on docs & code structure in JModelLegacy library classes (joomla#11057) Obviously, this should be an array. (joomla#11610) Don't manually import JPlatform anymore (joomla#10841) Parse preprocess rules from component routers (joomla#8986) Add the correct exception after 11593 merge (was waiting for that merrge) (joomla#11606) Add missing clean line after joomla#9277 (joomla#11605) Deprecate the _PROFILER global var (joomla#10845) Spelling errors (joomla#11604) Moved travis javascript bash file to build/travis like joomla#11600 (joomla#11603) Regression: Fix edit check in backend articles manager, always denying edit after soft deny (joomla#11511) [com_plugins] User not allowed to core.manage? Use 403 php custom exception (instead of a 404 JError) (joomla#11593) [com_newsfeeds] Make ACL core.edit.own work (PR for 11466) (joomla#11502) $result-variable-undefined-given-default-value (joomla#9277) com_banners use exceptions. and not allowed is a 403 (joomla#11418) Frontend & plugins using the autoloader (joomla#10882) New version of PR 6788 (JText::_() Optimizations) (joomla#11235) ...
* $result-variable-undefined-given-default-value * space-added-before-and-after-'='-operator
* $result-variable-undefined-given-default-value * space-added-before-and-after-'='-operator
Pull Request for Issue #9253 .
Summary of Changes
$result redefined with a default value.
Testing Instructions
Enable all errors reporting in php.
Add "exit()" to the end of the onContentAfterSave() method (this is for watching the error)
In the front-end, add a menu item "propose an article".
In the front-end do log as an user which can add article.
When the article is submitted, the following error is displayed:
Notice: Undefined variable: result in /home/plambotte/Public/projets/web/joomla3dev/component-factory/plugins/content/joomla/joomla.php on line 93
After the changes the error are no longer seen.