0 Пользователей и 1 Гость просматривают эту тему.
  • 3 Ответов
  • 2485 Просмотров
*

Elimelech

  • Захожу иногда
  • 261
  • 2 / 0
На сей раз ошибка вылезла.

Ошибку Undefined variable: dst_img  я уже понял как исправлять, а вот что делать с  Warning:  imagedestroy() expects parameter 1 to be resource, null given?

Код
 PHP Warning:  imagedestroy() expects parameter 1 to be resource, null given in /home/ukr508447/domains/мой сайт/public_html/plugins/content/joomslide.php on line 379
 PHP Notice:  Undefined variable: dst_img in /home/ukr508447/domains/мой сайт/public_html/plugins/content/joomslide.php on line 351
 PHP Notice:  Undefined variable: src_img in /home/ukr508447/domains/мой сайт/public_html/plugins/content/joomslide.php on line 351
 PHP Warning:  imagecopyresampled() expects parameter 1 to be resource, null given in /home/ukr408447/domains/мой сайт/public_html/plugins/content/joomslide.php on line 351
 PHP Notice:  Undefined variable: dst_img in /home/ukr508447/domains/мой сайт/public_html/plugins/content/joomslide.php on line 355
 PHP Warning:  imagejpeg() expects parameter 1 to be resource, null given in /home/ukr508447/domains/мой сайт/public_html/plugins/content/joomslide.php on line 355
PHP Notice:  Undefined variable: dst_img in /home/ukr508447/domains/мой сайт/public_html/plugins/content/joomslide.php on line 379
PHP Warning:  imagedestroy() expects parameter 1 to be resource, null given in /home/ukr508447/domains/мой сайт/public_html/plugins/content/joomslide.php on line 379
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: PHP Warning: imagedestroy() expects parameter 1 to be resource
« Ответ #1 : 23.12.2016, 12:38:34 »
шампанское походу отменяется... :)
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

Elimelech

  • Захожу иногда
  • 261
  • 2 / 0
Re: PHP Warning: imagedestroy() expects parameter 1 to be resource
« Ответ #2 : 23.12.2016, 12:59:49 »
шампанское походу отменяется... :)
нет, по закрытым сообщениям пьём шампанское, они не связаны с новой ошибкой!
*

Elimelech

  • Захожу иногда
  • 261
  • 2 / 0
Re: PHP Warning: imagedestroy() expects parameter 1 to be resource
« Ответ #3 : 24.12.2016, 10:37:49 »
я вот то не понял писать $article=""; или $article = ''; ? У меня в старом коде одна из переменных стоит вот так: $count="";

И ещё не как не могу врубить куда её присабачить в начале кода:

Код
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );

jimport( 'joomla.plugin.plugin' );

/**
 * redirection vers com_error404 plugin
 */
class plgSystemError404 extends JPlugin
{
/**
* Constructor
*
* For php4 compatibility we must not use the __constructor as a constructor for plugins
* because func_get_args ( void ) returns a copy of all passed arguments NOT references.
* This causes problems with cross-referencing necessary for the observer design pattern.
*
* @access protected
* @param object $subject The object to observe
* @param array   $config  An array that holds the plugin configuration
* @since 1.0
*/
/*function plgError404Stat( &$subject, $config )
{
parent::__construct( $subject, $config );

// Do some extra initialisation in this constructor if required
}*/

/**
* Do something onAfterInitialise
*/
function onAfterRoute()
{
global $mainframe;

// No need in admin panel
   if( $mainframe->isAdmin() ) return;

$option=JREQUEST::getVar("option",null,"REQUEST");
$view=JREQUEST::getVar("view",null,"REQUEST");
$Itemid=JREQUEST::getVar("Itemid",null,"REQUEST");
$task=JREQUEST::getVar("task",null,"REQUEST");
$id=JREQUEST::getVar("id",null,"GET");
$do=JREQUEST::getVar("do",null,"REQUEST");
$layout=JREQUEST::getVar("layout",null,"REQUEST");
//$func_kunena=JREQUEST::getVar("func",null,"GET");
$route=&JRouter::getInstance("site");
$uri=& JURI::getInstance();
$path=$uri->_path;
$mode=$route->_mode;
$count="";
                
//var_dump($option);var_dump($view);var_dump($id);var_dump($func_kunena);var_dump(JREQUEST::get());

// We verify in database that article exists
if ($option=="com_content" && $view=="article" && $id!="")
{
$id=explode(':',$id,2);
$id=$id[0];
$db =& JFactory::getDBO();
  $query = "SELECT COUNT(*) FROM #__content WHERE id = $id and (state=1 or state='-1')";
$db->setQuery($query);
$count = $db->loadResult();
                }

if ($option=="com_kunena" && $do!="") {return;}
if (($option=="com_content") && $view=="frontpage" && $Itemid==1 && !isset($_SERVER['REDIRECT_URL']) && $mode=="1") {return;}
   if (($option=="com_content") && $view=="frontpage" && $Itemid==1 && $_SERVER['SCRIPT_FILENAME']==JPATH_BASE."/index.php" && $mode=="0" && !isset($_SERVER['REDIRECT_URL'])) {return;}
  if (($option=="com_content") && $view=="article" && $layout=="form") {return;}
//if (($option=="com_content") && $view=="archive") {return;}
if ($article=="view" && $task=="edit") {return;}
if ($task=="save"){return;}
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Ошибка - Warning: DateTime::setTimezone()

Автор bos$

Ответов: 2
Просмотров: 1616
Последний ответ 03.12.2014, 19:12:35
от bos$
Warning: Creating default object from

Автор reketstyle

Ответов: 5
Просмотров: 2280
Последний ответ 21.11.2013, 15:34:03
от reketstyle
Warning: mysql_query() [function.mysql-query]: Unable to save result set in

Автор kempin

Ответов: 2
Просмотров: 3039
Последний ответ 22.10.2013, 16:02:17
от dark_star
Warning: POST Content-Length of 18927357 bytes exceeds the limit of 8388608 bytes in Unknown on line

Автор Аля

Ответов: 20
Просмотров: 39873
Последний ответ 28.05.2013, 22:33:50
от Аля
Ошибка в parameter.php

Автор Sliver

Ответов: 4
Просмотров: 2468
Последний ответ 19.02.2013, 01:22:09
от Sliver