katgirl / contao-avatar

avatar for contao
8 stars 6 forks source link

Warning wenn kein Bild ausgewählt ist #13

Closed Messa1 closed 10 years ago

Messa1 commented 10 years ago

Wenn beim Mitglied kein Bild ausgewählt ist kommt folgende Meldung im BE. Contao 2.3.6

Warning: unpack() [function.unpack]: Type H: not enough input, need 4, have 0 in system/modules/core/library/Contao/String.php on line 551

0 [internal function]: __error(2, 'unpack() [generate()

4 system/modules/core/templates/backend/be_widget.html5(3): Contao\Widget->generateWithError(true)

5 system/modules/core/library/Contao/Widget.php(554): include('/www/htdocs/w01...')

6 system/modules/core/classes/DataContainer.php(465): Contao\Widget->parse()

7 system/modules/core/drivers/DC_Table.php(1893): Contao\DataContainer->row('{personal_legen...')

8 system/modules/core/classes/Backend.php(429): Contao\DC_Table->edit()

9 contao/main.php(136): Contao\Backend->getBackendModule('member')

10 contao/main.php(287): Main->run()

11 {main}

Warning: implode() [function.implode]: Invalid arguments passed in system/modules/core/library/Contao/String.php on line 551

0 [internal function]: __error(2, 'implode() [generate()

4 system/modules/core/templates/backend/be_widget.html5(3): Contao\Widget->generateWithError(true)

5 system/modules/core/library/Contao/Widget.php(554): include('/www/htdocs/w01...')

6 system/modules/core/classes/DataContainer.php(465): Contao\Widget->parse()

7 system/modules/core/drivers/DC_Table.php(1893): Contao\DataContainer->row('{personal_legen...')

8 system/modules/core/classes/Backend.php(429): Contao\DC_Table->edit()

9 contao/main.php(136): Contao\Backend->getBackendModule('member')

10 contao/main.php(287): Main->run()

11 {main}

katgirl commented 10 years ago

Bitte aktualisiere auf Contao 2.11.16

tristanlins commented 10 years ago

Ähm, he use Contao 3.2.6, the UUID-validate-function where the unpack is called was introduced in the 3.2 series.

Messa1 commented 10 years ago

Yes im using contao 3.2.6 :)

Aybee commented 10 years ago

Ich habe das beheben können mit dieser IF-Anweisung in der Schleife

foreach ($arrValues as $k=>$v)
{
  if(!$k)
  {
    continue;
  }
  $return .= '<li data-id="'.\String::binToUuid($k).'">'.$v.'</li>';
}

https://github.com/katgirl/contao-avatar/blob/master/src/library/Avatar/AvatarFileUpload.php#L201

katgirl commented 10 years ago

43276b6414b5e5d19a4d83225eb973d9c8a933b6