TextformatterVideoEmbed icon indicating copy to clipboard operation
TextformatterVideoEmbed copied to clipboard

Error on invalid video link

Open rzelnik opened this issue 4 years ago • 2 comments

When I put a link on a non-existing or private Youtube video, it generates this error message:

Ouch… Fatal Error: Uncaught ArgumentCountError: Too few arguments to function WireHttp::_errorHandler(), 4 passed and exactly 5 expected in wire/core/WireHttp.php:1808

#0 [internal function]: WireHttp->_errorHandler()
#1 wire/core/WireHttp.php (551): fopen()
#2 wire/core/WireHttp.php (476): WireHttp->sendFopen()
#3 [internal function]: WireHttp->___send()
#4 wire/core/Wire.php (406): call_user_func_array()
#5 wire/core/WireHooks.php (823): Wire->_callMethod()
#6 wire/core/Wire.php (465): WireHooks->runHooks()
#7 wire/core/WireHttp.php (339): Wire->__call()
#8 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (262): WireHttp->get()
#9 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (233): TextformatterVideoEmbed->getNewEmbedCode()
#10 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (456): TextformatterVideoEmbed->getEmbedCode()
#11 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (411): TextformatterVideoEmbed->embedYoutube()
#12 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (389): TextformatterVideoEmbed->format()
#13 wire/modules/Fieldtype/FieldtypeText.module (98): TextformatterVideoEmbed->formatValue()
#14 wire/modules/Fieldtype/FieldtypeURL.module (63): FieldtypeText->___formatValue()
#15 wire/core/Wire.php (403): FieldtypeURL->___formatValue()
#16 wire/core/WireHooks.php (823): Wire->_callMethod()
#17 wire/core/Wire.php (428): WireHooks->runHooks()
#18 wire/core/Page.php (1576): Wire->_callHookMethod()
#19 wire/core/Page.php (1545): Page->formatFieldValue()
#20 wire/core/Page.php (1221): Page->getFieldValue()
#21 wire/core/Page.php (1846): Page->get()
#22 site/templates/article.php (18): Page->__get()
#23 wire/core/TemplateFile.php (318): require('...')
#24 wire/core/Wire.php (394): TemplateFile->___render()
#25 wire/core/WireHooks.php (823): Wire->_callMethod()
#26 wire/core/Wire.php (465): WireHooks->runHooks()
#27 wire/modules/PageRender.module (536): Wire->__call()
#28 wire/core/Wire.php (397): PageRender->___renderPage()
#29 wire/core/WireHooks.php (823): Wire->_callMethod()
#30 wire/core/Wire.php (465): WireHooks->runHooks()
#31 wire/core/WireHooks.php (924): Wire->__call()
#32 wire/core/Wire.php (465): WireHooks->runHooks()
#33 wire/modules/Process/ProcessPageView.module (213): Wire->__call()
#34 wire/core/Wire.php (397): ProcessPageView->___execute()
#35 wire/core/WireHooks.php (823): Wire->_callMethod()
#36 wire/core/Wire.php (465): WireHooks->runHooks()
#37 index.php (55): Wire->__call()
#38 {main}
thrown (line 1808 of wire/core/WireHttp.php) 

rzelnik avatar May 14 '21 05:05 rzelnik

I think this one was already fixed on the core dev branch awhile back. If you want you should be able to grab the /wire/core/WireHttp.php file from it if you don't want to use the dev branch.

On Fri, May 14, 2021 at 1:57 AM Robert Zelnik @.***> wrote:

When I put a link on non-existing or private Youtube video, it generates this error message:

Ouch… Fatal Error: Uncaught ArgumentCountError: Too few arguments to function WireHttp::_errorHandler(), 4 passed and exactly 5 expected in wire/core/WireHttp.php:1808

#0 [internal function]: WireHttp->_errorHandler()

#1 wire/core/WireHttp.php (551): fopen()

#2 wire/core/WireHttp.php (476): WireHttp->sendFopen()

#3 [internal function]: WireHttp->___send()

#4 wire/core/Wire.php (406): call_user_func_array()

#5 wire/core/WireHooks.php (823): Wire->_callMethod()

#6 wire/core/Wire.php (465): WireHooks->runHooks()

#7 wire/core/WireHttp.php (339): Wire->__call()

#8 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (262): WireHttp->get()

#9 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (233): TextformatterVideoEmbed->getNewEmbedCode()

#10 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (456): TextformatterVideoEmbed->getEmbedCode()

#11 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (411): TextformatterVideoEmbed->embedYoutube()

#12 site/modules/TextformatterVideoEmbed/TextformatterVideoEmbed.module (389): TextformatterVideoEmbed->format()

#13 wire/modules/Fieldtype/FieldtypeText.module (98): TextformatterVideoEmbed->formatValue()

#14 wire/modules/Fieldtype/FieldtypeURL.module (63): FieldtypeText->___formatValue()

#15 wire/core/Wire.php (403): FieldtypeURL->___formatValue()

#16 wire/core/WireHooks.php (823): Wire->_callMethod()

#17 wire/core/Wire.php (428): WireHooks->runHooks()

#18 wire/core/Page.php (1576): Wire->_callHookMethod()

#19 wire/core/Page.php (1545): Page->formatFieldValue()

#20 wire/core/Page.php (1221): Page->getFieldValue()

#21 wire/core/Page.php (1846): Page->get()

#22 site/templates/article.php (18): Page->__get()

#23 wire/core/TemplateFile.php (318): require('...')

#24 wire/core/Wire.php (394): TemplateFile->___render()

#25 wire/core/WireHooks.php (823): Wire->_callMethod()

#26 wire/core/Wire.php (465): WireHooks->runHooks()

#27 wire/modules/PageRender.module (536): Wire->__call()

#28 wire/core/Wire.php (397): PageRender->___renderPage()

#29 wire/core/WireHooks.php (823): Wire->_callMethod()

#30 wire/core/Wire.php (465): WireHooks->runHooks()

#31 wire/core/WireHooks.php (924): Wire->__call()

#32 wire/core/Wire.php (465): WireHooks->runHooks()

#33 wire/modules/Process/ProcessPageView.module (213): Wire->__call()

#34 wire/core/Wire.php (397): ProcessPageView->___execute()

#35 wire/core/WireHooks.php (823): Wire->_callMethod()

#36 wire/core/Wire.php (465): WireHooks->runHooks()

#37 index.php (55): Wire->__call()

#38 {main}

thrown (line 1808 of wire/core/WireHttp.php)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ryancramerdesign/TextformatterVideoEmbed/issues/18, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACQEUHXY6I3COET7V6SWC3TNS3VFANCNFSM4432EFHA .

ryancramerdesign avatar May 14 '21 14:05 ryancramerdesign

Thanks Ryan, good to know that it was already fixed. It isn't so urgent for me, so I will wait for the next stable release.

rzelnik avatar May 14 '21 18:05 rzelnik